Data processing method and device, computer readable storage medium and terminal equipment
By pre-establishing the parameter mapping relationship between algorithm rules and device data in the IoT device model and setting a data calculation template, the problem of low data processing efficiency of IoT devices is solved, and the data processing process and adaptive processing are achieved.
Patent Information
- Application Number
- CN202310664735.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2024-12-06
AI Technical Summary
After the existing IoT device model is connected to the system, the data processing efficiency is low, and it requires complex formatting processes. The algorithms of different computing modules vary greatly, making it difficult to process effective algorithm inputs quickly and at low cost.
During the construction of the device model, the parameter mapping relationship between the algorithm rules in the calculation module and the device data is pre-established, and the data calculation template is set based on the relationship, and the device data is directly encapsulated according to the template.
It improves data processing efficiency, reduces complex formatting processes, simplifies the processing of equipment data, and adapts to different data input formats.
Smart Images

Figure CN119088884A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of Internet of Things, and in particular, relates to a data processing method, apparatus, computer-readable storage medium and terminal device. Background Art
[0002] The Internet of Things (IoT) is a network that connects everything. It is an extension and expansion of the Internet. It combines various information sensing devices with the Internet to form a huge network, realizing the interconnection between things (Thing to Thing, T2T), people and things (Human to Thing, H2T), and people (Human to Human, H2H).
[0003] In order to facilitate the management of connected devices, corresponding device models can be built for each device in the Internet of Things. However, in the existing device model technology, after the device is connected to the Internet of Things system, the collected data requires a complex formatting process before it can be processed as an effective input parameter by the system computing module, which is relatively inefficient. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a data processing method, apparatus, computer-readable storage medium and terminal device to solve the problem of low efficiency of existing data processing methods.
[0005] A first aspect of an embodiment of the present application provides a data processing method, which may include:
[0006] In response to the data processing instruction, determining a device model corresponding to the data processing instruction;
[0007] Acquire device data corresponding to the device model;
[0008] Encapsulating the device data corresponding to the device model according to a preset data calculation template to obtain encapsulated data;
[0009] The packaging data is processed by using a calculation module corresponding to the device model to obtain a data processing result.
[0010] Through the above method, when data processing is required, the device data only needs to be packaged according to the pre-set data calculation template, and the calculation module can be used to calculate and process the packaged data, which effectively improves the data processing efficiency.
[0011] In a specific implementation of the first aspect, before packaging the device data corresponding to the device model according to a preset data calculation template, the method may further include:
[0012] Determine an algorithm rule corresponding to the calculation module;
[0013] Obtaining a parameter mapping relationship corresponding to the algorithm rule;
[0014] The data calculation template is set according to the parameter mapping relationship.
[0015] Through the above method, in the process of constructing the device model, a parameter mapping relationship between the algorithm parameters of the algorithm rules in the calculation module and the device data of the device model can be established in advance, and a data calculation template can be set according to the parameter mapping relationship, so that when performing subsequent data processing, the device data can be directly packaged according to the data calculation template without the need for a complicated formatting process, thereby effectively improving the data processing efficiency.
[0016] In a specific implementation of the first aspect, acquiring the parameter mapping relationship corresponding to the algorithm rule may include:
[0017] In response to a parameter mapping instruction, the algorithm parameters and device data identifier in the parameter mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameters and target device data is established; wherein the target device data is the device data indicated by the device data identifier.
[0018] Through the above method, a parameter mapping relationship between algorithm parameters and device data can be established according to user needs, thereby facilitating subsequent further processing of the device data.
[0019] In a specific implementation of the first aspect, the parameter mapping instruction includes a measurement data mapping instruction, and the device data identifier includes a measurement data identifier;
[0020] The step of obtaining the algorithm parameters and the device data identifier in the parameter mapping instruction in response to the parameter mapping instruction, and establishing the parameter mapping relationship between the algorithm parameters and the target device data may include:
[0021] In response to the measurement data mapping instruction, the algorithm parameters and the measurement data identifier in the measurement data mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameters and target measurement data is established; wherein the target measurement data is the measurement data indicated by the measurement data identifier.
[0022] Through the above method, a parameter mapping relationship between the algorithm parameters and the measurement data of the device can be established according to the user's needs, thereby facilitating the subsequent further processing of the measurement data of the device.
[0023] In a specific implementation of the first aspect, the parameter mapping instruction includes an event mapping instruction, and the device data identifier includes an event identifier;
[0024] The step of obtaining the algorithm parameters and the device data identifier in the parameter mapping instruction in response to the parameter mapping instruction, and establishing the parameter mapping relationship between the algorithm parameters and the target device data may include:
[0025] In response to the event mapping instruction, the algorithm parameters and the event identifier in the event mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameters and the target event is established; wherein the target event is the event indicated by the event identifier.
[0026] Through the above method, a parameter mapping relationship between algorithm parameters and device events can be established according to user needs, thereby facilitating subsequent further processing of device events.
[0027] In a specific implementation of the first aspect, the parameter mapping instruction includes an attribute mapping instruction, and the device data identifier includes an attribute identifier;
[0028] The step of obtaining the algorithm parameters and the device data identifier in the parameter mapping instruction in response to the parameter mapping instruction, and establishing the parameter mapping relationship between the algorithm parameters and the target device data may include:
[0029] In response to the attribute mapping instruction, the algorithm parameter and the attribute identifier in the attribute mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameter and a target attribute is established; wherein the target attribute is the attribute indicated by the attribute identifier.
[0030] Through the above method, a parameter mapping relationship between algorithm parameters and device attributes can be established according to user needs, thereby facilitating subsequent further processing of device attributes.
[0031] In a specific implementation of the first aspect, the parameter mapping instruction includes a calculation result mapping instruction, and the device data identifier includes a calculation result identifier;
[0032] The step of obtaining the algorithm parameters and the device data identifier in the parameter mapping instruction in response to the parameter mapping instruction, and establishing the parameter mapping relationship between the algorithm parameters and the target device data may include:
[0033] In response to the calculation result mapping instruction, the algorithm parameters and the calculation result identifier in the calculation result mapping instruction are obtained, and a parameter mapping relationship between the algorithm parameters and the target calculation result is established; wherein the target calculation result is the calculation result indicated by the calculation result identifier.
[0034] Through the above method, a parameter mapping relationship between the algorithm parameters and the calculation results of the device can be established according to the user's needs, thereby facilitating the subsequent further processing of the calculation results of the device.
[0035] A second aspect of an embodiment of the present application provides a data processing device, which may include:
[0036] a device model determination module, configured to determine, in response to a data processing instruction, a device model corresponding to the data processing instruction;
[0037] A device data acquisition module, used to acquire device data corresponding to the device model;
[0038] A data encapsulation module, used to encapsulate the device data corresponding to the device model according to a preset data calculation template to obtain encapsulated data;
[0039] The data processing module is used to use the calculation module corresponding to the device model to perform calculation processing on the packaging data to obtain a data processing result.
[0040] Through the above device, when data processing is required, it is only necessary to package the device data according to the pre-set data calculation template, and the calculation module can be used to calculate and process the packaged data, which effectively improves the data processing efficiency.
[0041] In a specific implementation of the second aspect, the data processing device may further include:
[0042] An algorithm rule determination module, used to determine the algorithm rule corresponding to the calculation module;
[0043] A parameter mapping module, used to obtain a parameter mapping relationship corresponding to the algorithm rule;
[0044] A data calculation template setting module is used to set the data calculation template according to the parameter mapping relationship.
[0045] Through the above-mentioned device, in the process of constructing the device model, a parameter mapping relationship between the algorithm parameters of the algorithm rules in the calculation module and the device data of the device model can be established in advance, and a data calculation template can be set according to the parameter mapping relationship, so that when performing subsequent data processing, the device data can be directly packaged according to the data calculation template without the need for a complicated formatting process, thereby effectively improving the data processing efficiency.
[0046] In a specific implementation of the second aspect, the parameter mapping module can be specifically used to: respond to a parameter mapping instruction, obtain the algorithm parameters and device data identifiers in the parameter mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target device data; wherein the target device data is the device data indicated by the device data identifier.
[0047] Through the above device, a parameter mapping relationship between algorithm parameters and device data can be established according to user needs, thereby facilitating subsequent further processing of the device data.
[0048] In a specific implementation manner of the second aspect, the parameter mapping instruction may include a measurement data mapping instruction, and the device data identifier may include a measurement data identifier;
[0049] The parameter mapping module may include:
[0050] A measurement data mapping unit is used to respond to the measurement data mapping instruction, obtain the algorithm parameters and the measurement data identifier in the measurement data mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and target measurement data; wherein the target measurement data is the measurement data indicated by the measurement data identifier.
[0051] Through the above device, a parameter mapping relationship between the algorithm parameters and the measurement data of the device can be established according to the user's needs, thereby facilitating the subsequent further processing of the measurement data of the device.
[0052] In a specific implementation manner of the second aspect, the parameter mapping instruction may include an event mapping instruction, and the device data identifier may include an event identifier;
[0053] The parameter mapping module may include:
[0054] An event mapping unit is used to respond to the event mapping instruction, obtain the algorithm parameters and the event identifier in the event mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target event; wherein the target event is the event indicated by the event identifier.
[0055] Through the above device, a parameter mapping relationship between algorithm parameters and device events can be established according to user needs, thereby facilitating subsequent further processing of device events.
[0056] In a specific implementation manner of the second aspect, the parameter mapping instruction may include an attribute mapping instruction, and the device data identifier may include an attribute identifier;
[0057] The parameter mapping module may include:
[0058] The attribute mapping unit is used to respond to the attribute mapping instruction, obtain the algorithm parameters and the attribute identifier in the attribute mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target attribute; wherein the target attribute is the attribute indicated by the attribute identifier.
[0059] Through the above device, a parameter mapping relationship between algorithm parameters and device attributes can be established according to user needs, thereby facilitating subsequent further processing of the device attributes.
[0060] In a specific implementation of the second aspect, the parameter mapping instruction may include a calculation result mapping instruction, and the device data identifier may include a calculation result identifier;
[0061] The parameter mapping module may include:
[0062] A calculation result mapping unit is used to respond to the calculation result mapping instruction, obtain the algorithm parameters and the calculation result identifier in the calculation result mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target calculation result; wherein the target calculation result is the calculation result indicated by the calculation result identifier.
[0063] Through the above device, a parameter mapping relationship between the algorithm parameters and the calculation results of the device can be established according to the needs of the user, thereby facilitating the subsequent further processing of the calculation results of the device.
[0064] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned data processing methods are implemented.
[0065] The fourth aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned data processing methods when executing the computer program.
[0066] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the steps of any one of the above-mentioned data processing methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0068] Figure 1 A schematic flow chart of the setup process for a data calculation template;
[0069] Figure 2 A schematic diagram for configuring the mapping relationship of measurement data;
[0070] Figure 3 is the first schematic diagram of the human-computer interaction interface;
[0071] Figure 4 is a second schematic diagram of the human-computer interaction interface;
[0072] Figure 5 A schematic diagram for configuring event mapping relationships;
[0073] Figure 6 It is a schematic diagram of the configuration attribute mapping relationship;
[0074] Figure 7 A schematic diagram for configuring the mapping relationship of calculation results;
[0075] Figure 8 This is a flow chart of an embodiment of a data processing method in an embodiment of the present application;
[0076] Fig. 9 A schematic block diagram of a data processing system in an embodiment of the present application;
[0077] Fig.10 This is a structural diagram of an embodiment of a data processing device in an embodiment of the present application;
[0078] Fig.11 This is a schematic block diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0079] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0080] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0081] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0082] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0083] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0084] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0085] The embodiments of the present application can be applied to the Internet of Things scenario. The Internet of Things can collect any objects or processes that need to be detected, connected, and interacted in real time through various devices and technologies such as information sensors, radio frequency identification technology, positioning systems, infrared sensors, laser scanners, etc., and collect various required information such as sound, light, heat, electricity, mechanics, chemistry, biology, and location. Through various possible network accesses, ubiquitous connections between objects and objects, and between objects and people can be achieved, and intelligent perception, identification, and management of objects and processes can be realized.
[0086] In the IoT scenario, in order to facilitate the management of devices connected to it, various types of information about devices in the real world can be abstracted and a model used to describe devices in the real world, namely, a device model, can be constructed.
[0087] In the existing device model technology, after the device is connected to the IoT system, the collected data needs a complex formatting process before it can be processed as an effective input parameter by the system's computing module. The algorithms used by different computing modules often vary greatly. The existing device model data processing methods are difficult to process and generate effective algorithm input quickly and at low cost. Moreover, processing different data input formats also restricts the efficiency of device model and system development and maintenance.
[0088] In order to solve this problem, in the embodiment of the present application, in the process of constructing the device model, a parameter mapping relationship between the algorithm parameters of the algorithm rules in the calculation module and the device data of the device model can be established in advance, and a data calculation template can be set according to the parameter mapping relationship. When data processing is required, the device data only needs to be packaged according to the data calculation template, and the calculation module can be used to calculate and process the packaged data, which effectively improves the data processing efficiency.
[0089] The execution subject of the embodiments of the present application may be a terminal device, specifically, may include but is not limited to computing devices such as desktop computers, notebooks, and handheld computers.
[0090] like Figure 1 As shown, the process of setting up a data calculation template may include the following steps:
[0091] Step S101: Determine the algorithm rules corresponding to the calculation module.
[0092] Among them, the computing module is a module used for data computing and processing in the IoT system. It is a combination of a series of algorithms and implementation programs. The implementation method includes writing programs or scripts in common scripting languages and frameworks such as python, groovy, and shell. The program code or script constitutes a computing service that can provide network access or interface access. Different computing modules can use different algorithm rules to implement their corresponding computing and processing functions. Here, the input of the algorithm rules can be recorded as the algorithm parameters. Through the algorithm rules, the algorithm parameters can be calculated and processed accordingly to obtain the data processing results.
[0093] The algorithm rules may include but are not limited to finding the maximum value among several values, finding the minimum value among several values, and finding the average value of several values, etc. For any calculation module, the specific algorithm rules it adopts can be pre-configured by the user according to actual conditions, and the embodiments of the present application do not specifically limit this.
[0094] When the user configures the corresponding algorithm rules for the calculation module, the algorithm rules and corresponding algorithm parameters can be input into the terminal device through the preset human-machine interaction (HMI) interface. The terminal device can determine the algorithm rules corresponding to the calculation module according to the information input by the user.
[0095] Step S102: Obtain a parameter mapping relationship corresponding to the algorithm rule.
[0096] The parameter mapping relationship is a mapping relationship between algorithm parameters and device data. The mapping relationship may be a many-to-many mapping relationship, that is, one algorithm parameter may correspond to at least one device data, and one device data may correspond to at least one algorithm parameter.
[0097] The parameter mapping relationship can be pre-configured by the user according to the actual situation. When the user configures the parameter mapping relationship, the parameter mapping instruction can be sent to the terminal device through the preset human-computer interaction interface. The parameter mapping instruction may include the algorithm parameter and the corresponding device data identifier. The algorithm parameter is the identifier of the algorithm parameter. Different algorithm parameters have different algorithm parameters to distinguish different algorithm parameters. The device data identifier is the identifier of the device data. Different device data have different device data identifiers to distinguish different device data.
[0098] After receiving the parameter mapping instruction, the terminal device can respond to the parameter mapping instruction, obtain the algorithm parameters and device data identifier in the parameter mapping instruction, and establish a parameter mapping relationship between the algorithm parameters in the parameter mapping instruction and the target device data, wherein the target device data is the device data indicated by the device data identifier in the parameter mapping instruction.
[0099] Through the above method, a parameter mapping relationship between algorithm parameters and device data can be established according to user needs, thereby facilitating subsequent further processing of the device data.
[0100] In a specific implementation of the embodiment of the present application, the device data may include measurement data, wherein the measurement data refers to indicator data measured by sensors and instruments, such as the cell voltage, current, insulation resistance, etc. of the power battery.
[0101] In this case, the parameter mapping relationship may include a measurement data mapping relationship, that is, a mapping relationship between algorithm parameters and measurement data.
[0102] When the user configures the measurement data mapping relationship, a measurement data mapping instruction can be sent to the terminal device through a preset human-computer interaction interface, and the measurement data mapping instruction may include algorithm parameters and corresponding measurement data identifiers. The measurement data identifier is an identifier of the measurement data, and different measurement data has different measurement data identifiers to distinguish different measurement data.
[0103] Figure 2 The following is a schematic diagram of configuring the measurement data mapping relationship. For the algorithm rules of any calculation module, users can Figure 3 Select the parameter mapping option corresponding to the algorithm rule of the calculation module in the human-computer interaction interface shown in FIG. Figure 4 The parameter mapping configuration interface shown in the figure is used to configure the measurement data mapping relationship in the parameter mapping configuration interface. For example, in the parameter mapping configuration interface, the user can select the algorithm parameter recieveTime for the measurement data identifier receive_time_ts of the cell voltage, that is, the mapping relationship between the cell voltage and recieveTime is configured; select the algorithm parameter BatUcell for the measurement data identifier bat_ucell of the cell voltage, that is, the mapping relationship between the cell voltage and BatUcell is configured; select the algorithm parameter BatUcell for the measurement data identifier bat_ucell of the cell voltage, that is, the mapping relationship between the cell voltage and BatUcell is configured. When the user confirms the configuration operation, the measurement data mapping instruction can be triggered.
[0104] After receiving the measurement data mapping instruction, the terminal device may respond to the measurement data mapping instruction, obtain the algorithm parameters and the measurement data identifier in the measurement data mapping instruction, and establish a measurement data mapping relationship between the algorithm parameters in the parameter mapping instruction and the target measurement data, wherein the target measurement data is the measurement data indicated by the measurement data identifier in the measurement data mapping instruction.
[0105] Through the above method, a parameter mapping relationship between the algorithm parameters and the measurement data of the device can be established according to the user's needs, thereby facilitating the subsequent further processing of the measurement data of the device.
[0106] In a specific implementation of the embodiment of the present application, the device data may include events, where an event refers to information about changes in the device's operating state and information about the completion of the device's sending instructions, which may include but are not limited to device alarms, changes in the device's start / stop state, changes in operating conditions, such as battery charging.
[0107] In this case, the parameter mapping relationship may include an event mapping relationship, that is, a mapping relationship between algorithm parameters and events.
[0108] When the user configures the event mapping relationship, the event mapping instruction can be sent to the terminal device through the preset human-computer interaction interface. The event mapping instruction may include algorithm parameters and corresponding event identifiers. The event identifier is the identifier of the event. Different events have different event identifiers to distinguish different events.
[0109] Figure 5 The following is a schematic diagram of configuring event mapping relationships. For the algorithm rules of any calculation module, users can Figure 3 Select the parameter mapping option corresponding to the algorithm rule of the calculation module in the human-computer interaction interface shown in FIG. Figure 4 The parameter mapping configuration interface shown in the figure is used to configure the event mapping relationship. When the user confirms the configuration operation, the event mapping instruction can be triggered.
[0110] After receiving the event mapping instruction, the terminal device can respond to the event mapping instruction, obtain the algorithm parameters and event identifier in the event mapping instruction, and establish an event mapping relationship between the algorithm parameters in the parameter mapping instruction and the target event, wherein the target event is the event indicated by the event identifier in the event mapping instruction.
[0111] Through the above method, a parameter mapping relationship between algorithm parameters and device events can be established according to user needs, thereby facilitating subsequent further processing of device events.
[0112] In a specific implementation of the embodiment of the present application, the device data may include attributes, where the attributes refer to the most basic inherent information of the device itself, such as the physical characteristics, brand, and production date of the device.
[0113] In this case, the parameter mapping relationship may include an attribute mapping relationship, that is, a mapping relationship between algorithm parameters and attributes.
[0114] When the user configures the attribute mapping relationship, the attribute mapping instruction can be sent to the terminal device through the preset human-computer interaction interface. The attribute mapping instruction may include algorithm parameters and corresponding attribute identifiers. The attribute identifier is the identifier of the attribute. Different attributes have different attribute identifiers to distinguish different attributes.
[0115] Figure 6 The following is a schematic diagram of the configuration attribute mapping relationship. For the algorithm rules of any calculation module, users can Figure 3 Select the parameter mapping option corresponding to the algorithm rule of the calculation module in the human-computer interaction interface shown in FIG. Figure 4The parameter mapping configuration interface shown in the figure is used to configure the attribute mapping relationship in the parameter mapping configuration interface. When the user confirms the configuration operation, the attribute mapping instruction can be triggered.
[0116] After receiving the attribute mapping instruction, the terminal device can respond to the attribute mapping instruction, obtain the algorithm parameters and attribute identifiers in the attribute mapping instruction, and establish an attribute mapping relationship between the algorithm parameters in the parameter mapping instruction and the target attribute, wherein the target attribute is the attribute indicated by the attribute identifier in the attribute mapping instruction.
[0117] Through the above method, a parameter mapping relationship between algorithm parameters and device attributes can be established according to user needs, thereby facilitating subsequent further processing of device attributes.
[0118] In a specific implementation of the embodiment of the present application, the device data may include calculation results, wherein the calculation results refer to data processing results output by other calculation modules, such as the average voltage, the maximum current, and the like.
[0119] In this case, the parameter mapping relationship may include a calculation result mapping relationship, that is, a mapping relationship between algorithm parameters and calculation results.
[0120] When the user configures the calculation result mapping relationship, the calculation result mapping instruction can be sent to the terminal device through the preset human-computer interaction interface. The calculation result mapping instruction may include the algorithm parameters and the corresponding calculation result identification. The calculation result identification is the identification of the calculation result. Different calculation results have different calculation result identifications to distinguish different calculation results.
[0121] Figure 7 The following is a schematic diagram of configuring the mapping relationship of calculation results. For the algorithm rules of any calculation module, users can Figure 3 Select the parameter mapping option corresponding to the algorithm rule of the calculation module in the human-computer interaction interface shown in FIG. Figure 4 The parameter mapping configuration interface shown in the figure is used to configure the calculation result mapping relationship in the parameter mapping configuration interface. When the user confirms the configuration operation, the calculation result mapping instruction can be triggered.
[0122] After receiving the calculation result mapping instruction, the terminal device can respond to the calculation result mapping instruction, obtain the algorithm parameters and calculation result identifier in the calculation result mapping instruction, and establish a calculation result mapping relationship between the algorithm parameters in the parameter mapping instruction and the target calculation result. The target calculation result is the calculation result indicated by the calculation result identifier in the calculation result mapping instruction.
[0123] Through the above method, a parameter mapping relationship between the algorithm parameters and the calculation results of the device can be established according to the user's needs, thereby facilitating the subsequent further processing of the calculation results of the device.
[0124] Step S103: Setting a data calculation template according to the parameter mapping relationship.
[0125] After obtaining the parameter mapping relationship corresponding to the algorithm rule, the algorithm parameters in the algorithm rule can be replaced with the corresponding device data according to the parameter mapping relationship, thereby obtaining a data calculation template.
[0126] pass Figure 1 The process shown can, during the construction of the device model, pre-establish a parameter mapping relationship between the algorithm parameters of the algorithm rules in the calculation module and the device data of the device model, and set a data calculation template based on the parameter mapping relationship, so that when performing subsequent data processing, the device data can be directly packaged according to the data calculation template without the need for a complicated formatting process, thereby effectively improving data processing efficiency.
[0127] See also Figure 8 , an embodiment of a data processing method in the embodiment of the present application may include:
[0128] Step S801: In response to a data processing instruction, determine a device model corresponding to the data processing instruction.
[0129] When data processing is required, a data processing instruction can be issued to the terminal device through a preset human-computer interaction interface, and the data processing instruction can include a device model identifier. The device model identifier is the identifier of the device model, and different device models have different device model identifiers to distinguish different device models.
[0130] After receiving the data processing instruction, the terminal device may respond to the parameter mapping instruction, obtain the device model identifier in the data processing instruction, and determine the device model corresponding to the data processing instruction according to the device model identifier.
[0131] Step S802: Acquire device data corresponding to the device model.
[0132] The acquired device data may include but is not limited to measurement data, events, attributes, and calculation results.
[0133] Step S803: encapsulate the device data corresponding to the device model according to a preset data calculation template to obtain encapsulated data.
[0134] In a specific implementation of the embodiment of the present application, the device data may be encapsulated in sequence in a preset data queue according to the calculation order of the device data in the data calculation template, thereby obtaining encapsulated data.
[0135] Step S804: Use the calculation module corresponding to the device model to perform calculation processing on the packaged data to obtain a data processing result.
[0136] In summary, in the embodiment of the present application, in the process of constructing the device model, a parameter mapping relationship between the algorithm parameters of the algorithm rules in the calculation module and the device data of the device model can be established in advance, and a data calculation template can be set according to the parameter mapping relationship. When data processing is required, the device data only needs to be packaged according to the data calculation template, and the calculation module can be used to calculate and process the packaged data, which effectively improves the data processing efficiency.
[0137] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0138] Fig. 9 This is a schematic block diagram of a data processing system in an embodiment of the present application. As shown in the figure, the front-end module of the data processing system may include a metadata configuration module, a model data display module, and an algorithm rule configuration module. Among them, the metadata configuration module can be used for users to configure, manage, and edit device model definitions and device data identifications, etc.; the model data display module can be used for users to view device model definitions and related data; the algorithm rule configuration module can be used for users to configure, manage, and edit algorithm rules and parameter mapping relationships between algorithm parameters and device data, etc.
[0139] The backend module of the data processing system may include a metadata processing service module, a model data service module, and a model data push service module. Among them, the metadata processing service module can be used to provide data processing and interface services for the metadata configuration module of the front end; the model data service module can be used to provide data processing and interface services for the model data display module of the front end; the model data push service module can be used to provide data and interface services for the algorithm rule configuration module of the front end, and provide data query interface services for the algorithm rule configuration for other microservices.
[0140] Various model definitions and configuration data are stored in the relational database, and equipment data is collected through the data collection service module and stored in the data warehouse.
[0141] Corresponding to a data processing method described in the above embodiment, Fig.10A structural diagram of an embodiment of a data processing device provided in an embodiment of the present application is shown.
[0142] In this embodiment, a data processing device may include:
[0143] The device model determination module 1001 is used to determine the device model corresponding to the data processing instruction in response to the data processing instruction;
[0144] The device data acquisition module 1002 is used to acquire device data corresponding to the device model;
[0145] The data encapsulation module 1003 is used to encapsulate the device data corresponding to the device model according to a preset data calculation template to obtain encapsulated data;
[0146] The data processing module 1004 is used to use the calculation module corresponding to the device model to perform calculation processing on the packaging data to obtain a data processing result.
[0147] In a specific implementation of the embodiment of the present application, the data processing device may further include:
[0148] An algorithm rule determination module, used to determine the algorithm rule corresponding to the calculation module;
[0149] A parameter mapping module, used to obtain a parameter mapping relationship corresponding to the algorithm rule;
[0150] A data calculation template setting module is used to set the data calculation template according to the parameter mapping relationship.
[0151] In a specific implementation method of an embodiment of the present application, the parameter mapping module can be specifically used to: respond to a parameter mapping instruction, obtain the algorithm parameters and device data identifiers in the parameter mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target device data; wherein the target device data is the device data indicated by the device data identifier.
[0152] In a specific implementation manner of the embodiment of the present application, the parameter mapping instruction may include a measurement data mapping instruction, and the device data identifier may include a measurement data identifier;
[0153] The parameter mapping module may include:
[0154] A measurement data mapping unit is used to respond to the measurement data mapping instruction, obtain the algorithm parameters and the measurement data identifier in the measurement data mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and target measurement data; wherein the target measurement data is the measurement data indicated by the measurement data identifier.
[0155] In a specific implementation manner of the embodiment of the present application, the parameter mapping instruction may include an event mapping instruction, and the device data identifier may include an event identifier;
[0156] The parameter mapping module may include:
[0157] An event mapping unit is used to respond to the event mapping instruction, obtain the algorithm parameters and the event identifier in the event mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target event; wherein the target event is the event indicated by the event identifier.
[0158] In a specific implementation manner of the embodiment of the present application, the parameter mapping instruction may include an attribute mapping instruction, and the device data identifier may include an attribute identifier;
[0159] The parameter mapping module may include:
[0160] The attribute mapping unit is used to respond to the attribute mapping instruction, obtain the algorithm parameters and the attribute identifier in the attribute mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target attribute; wherein the target attribute is the attribute indicated by the attribute identifier.
[0161] In a specific implementation of the embodiment of the present application, the parameter mapping instruction may include a calculation result mapping instruction, and the device data identifier may include a calculation result identifier;
[0162] The parameter mapping module may include:
[0163] A calculation result mapping unit is used to respond to the calculation result mapping instruction, obtain the algorithm parameters and the calculation result identifier in the calculation result mapping instruction, and establish a parameter mapping relationship between the algorithm parameters and the target calculation result; wherein the target calculation result is the calculation result indicated by the calculation result identifier.
[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0165] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0166] Fig.11 A schematic block diagram of a terminal device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0167] like Fig.11 As shown, the terminal device 11 of this embodiment includes: a processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the processor 110. When the processor 110 executes the computer program 112, the steps in the above-mentioned data processing method embodiments are implemented, for example Figure 8 Alternatively, when the processor 110 executes the computer program 112, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Fig.10 The functions of modules 1001 to 1004 are shown.
[0168] Exemplarily, the computer program 112 may be divided into one or more modules / units, which are stored in the memory 111 and executed by the processor 110 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 112 in the terminal device 11.
[0169] The terminal device 11 may be a computing device such as a desktop computer, a notebook, a palm computer, etc. Those skilled in the art will appreciate that Fig.11 It is only an example of the terminal device 11 and does not constitute a limitation of the terminal device 11. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 11 may also include input and output devices, network access devices, buses, etc.
[0170] The processor 110 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0171] The memory 111 may be an internal storage unit of the terminal device 11, such as a hard disk or memory of the terminal device 11. The memory 111 may also be an external storage device of the terminal device 11, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 11. Further, the memory 111 may also include both an internal storage unit of the terminal device 11 and an external storage device. The memory 111 is used to store the computer program and other programs and data required by the terminal device 11. The memory 111 may also be used to temporarily store data that has been output or is to be output.
[0172] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0173] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0174] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0175] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0178] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0179] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: include: In response to the data processing instruction, determining a device model corresponding to the data processing instruction; Acquire device data corresponding to the device model; Encapsulating the device data corresponding to the device model according to a preset data calculation template to obtain encapsulated data; The packaging data is processed by using a calculation module corresponding to the device model to obtain a data processing result.
2. The data processing method according to claim 1, characterized in that: Before packaging the device data corresponding to the device model according to a preset data calculation template, the method further includes: Determine an algorithm rule corresponding to the calculation module; Obtaining a parameter mapping relationship corresponding to the algorithm rule; The data calculation template is set according to the parameter mapping relationship.
3. The data processing method according to claim 2, characterized in that: The obtaining of the parameter mapping relationship corresponding to the algorithm rule includes: In response to a parameter mapping instruction, the algorithm parameters and device data identifier in the parameter mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameters and target device data is established; wherein the target device data is the device data indicated by the device data identifier.
4. The data processing method according to claim 3, characterized in that: The parameter mapping instruction includes a measurement data mapping instruction, and the device data identifier includes a measurement data identifier; The step of obtaining, in response to a parameter mapping instruction, an algorithm parameter and a device data identifier in the parameter mapping instruction, and establishing a parameter mapping relationship between the algorithm parameter and the target device data includes: In response to the measurement data mapping instruction, the algorithm parameters and the measurement data identifier in the measurement data mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameters and target measurement data is established; wherein the target measurement data is the measurement data indicated by the measurement data identifier.
5. The data processing method according to claim 3, characterized in that: The parameter mapping instruction includes an event mapping instruction, and the device data identifier includes an event identifier; The step of obtaining, in response to a parameter mapping instruction, an algorithm parameter and a device data identifier in the parameter mapping instruction, and establishing a parameter mapping relationship between the algorithm parameter and the target device data includes: In response to the event mapping instruction, the algorithm parameters and the event identifier in the event mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameters and the target event is established; wherein the target event is the event indicated by the event identifier.
6. The data processing method according to claim 3, characterized in that: The parameter mapping instruction includes an attribute mapping instruction, and the device data identifier includes an attribute identifier; The step of obtaining, in response to a parameter mapping instruction, an algorithm parameter and a device data identifier in the parameter mapping instruction, and establishing a parameter mapping relationship between the algorithm parameter and the target device data includes: In response to the attribute mapping instruction, the algorithm parameter and the attribute identifier in the attribute mapping instruction are acquired, and a parameter mapping relationship between the algorithm parameter and a target attribute is established; wherein the target attribute is the attribute indicated by the attribute identifier.
7. The data processing method according to claim 3, characterized in that: The parameter mapping instruction includes a calculation result mapping instruction, and the device data identifier includes a calculation result identifier; The step of obtaining, in response to a parameter mapping instruction, an algorithm parameter and a device data identifier in the parameter mapping instruction, and establishing a parameter mapping relationship between the algorithm parameter and the target device data includes: In response to the calculation result mapping instruction, the algorithm parameters and the calculation result identifier in the calculation result mapping instruction are obtained, and a parameter mapping relationship between the algorithm parameters and the target calculation result is established; wherein the target calculation result is the calculation result indicated by the calculation result identifier.
8. A data processing device, characterized in that: include: a device model determination module, configured to determine, in response to a data processing instruction, a device model corresponding to the data processing instruction; A device data acquisition module, used to acquire device data corresponding to the device model; A data encapsulation module, used to encapsulate the device data corresponding to the device model according to a preset data calculation template to obtain encapsulated data; The data processing module is used to use the calculation module corresponding to the device model to perform calculation processing on the packaging data to obtain a data processing result.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.
10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the data processing method according to any one of claims 1 to 7 are implemented.
