Method and device for extracting logical features of sensor data based on translation embedding

Through the translation embedding method, the logical features of the sensing data are extracted, and the problem of insufficient fine-grained feature modeling of sensing data is solved, achieving more accurate and efficient data analysis.

CN119204192BActive Publication Date: 2025-04-08BEIJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411706615.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-04-08
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

The prior art has shortcomings in capturing the fine-grained features of sensing data, especially in the fine modeling of numerical relationships, logical features and trend information, which leads to the inability of the model to deeply explore the subtle features in the sensing data, affecting the analysis effect and prediction accuracy.

Method used

The logical feature extraction method of sensing data based on translation embedding is adopted. Through the vector embedding module, the relationship building module and the feature extraction module, the embedded vector and logical relationship representation in the sensing data sequence are determined, the logical feature vector is generated, and the internal characteristics of the sensing data are deeply mined.

Benefits of technology

This method can capture subtle features in sensing data more deeply, enhance the model's expressiveness in tasks such as prediction and anomaly detection, and improve the accuracy and practicality of data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119204192B_ABST
    Figure CN119204192B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for extracting logical features of sensor data based on translation embedding, the method comprising: obtaining a sensor data sequence for logical feature extraction, inputting the sensor data sequence into a trained logical feature extraction model, the sensor data sequence comprising monitoring data of multiple time steps monitored by the sensor, the logical feature extraction model comprising a vector embedding module, a relationship construction module and a feature extraction module; determining an embedding vector corresponding to each monitoring data in the sensor data sequence based on the vector embedding module, determining the logical relationship representation between the monitoring data through the relationship construction module based on each embedding vector, generating a logical feature vector corresponding to each monitoring data through a feature extraction module based on each embedding vector and each logical relationship representation; wherein the logical relationship representation is an arithmetic relationship representation or a directional relationship representation. The method can better capture subtle features in sensor data and improve the accuracy and practicality of data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method and device for extracting logical features of sensor data based on translation embedding. Background Art

[0002] With the popularity and large-scale deployment of Internet of Things (IoT) devices around the world, the generation of sensor data is showing exponential growth. These data are widely used in scenarios such as environmental monitoring, intelligent transportation, smart cities and intelligent manufacturing, providing extremely important data support for improving system operation efficiency, optimizing resource allocation, real-time prediction and intelligent decision-making. For example, in environmental monitoring, through the sensor network deployed in different locations, the system can collect data such as temperature, humidity, air pressure, light intensity and pollutant concentration in real time; these sensor data not only provide a detailed description of the environmental status, but also reveal potential trend changes and abnormal signals through data analysis, providing key references for decision-making in environmental management, risk warning and other aspects.

[0003] Sensor data is generally expressed as a single-value or multi-dimensional time series data stream. By deeply analyzing such data, a large amount of feature information with application value can be extracted. However, current sensor data analysis methods mainly focus on improving overall prediction accuracy and operating efficiency by improving model structure and algorithm optimization. These optimization methods have indeed improved the performance of the model to a certain extent, but they are still insufficient in capturing the fine-grained features of sensor data, especially in the fine modeling of numerical relationships, logical features and trend information. Taking time series data such as temperature and pollutant concentration as an example, the arithmetic relationships such as relative size, growth or decay trends in these data often contain key prediction information. At the same time, the directionality of the data (such as rising and falling trends and fluctuation patterns) is of great significance to data interpretation and prediction. The lack of modeling of these logical and directional features will result in the model being unable to capture the inherent dynamic relationships of the data, affecting the analysis effect and prediction accuracy.

[0004] In addition, after different sensor data are input into the prediction model, if there is a lack of effective constraints on the logical relationship, the deviation of numerical values ​​in the model processing process may increase, destroying the inherent relationship and characteristics of the data, and weakening the model's understanding and modeling capabilities of the data connotation. The shortcomings of traditional analysis methods in this regard have prevented the feature mining and application value of sensor data from being fully utilized.

[0005] Specifically, the prior art discloses a time series feature extraction method based on contrastive learning, which randomly samples two overlapping subsequences from the input time series and encourages consistent context representation on common segments; the original input is fed into an encoder, which is jointly optimized with a hierarchical contrast loss to extract time series features. Figure 1As shown in the figure, the method uses an encoder to extract sequence features. The encoder consists of three components: input projection layer, timestamp masking module and dilated CNN; and the hierarchical contrast loss function consists of two parts: Temporal Contrastive Loss and Instance-wise Contrastive Loss; these two losses complement each other. Instance-wise Contrastive Loss can learn the specific features of each sequence variable, while temporal contrast loss aims to explore the trend of dynamic changes over time. Although the time series feature extraction method based on contrastive learning can realize data feature extraction, it lacks modeling of fine-grained numerical logical relationships, that is, it focuses more on capturing the temporal contextual relationship of the entire sequence, and cannot deeply explore the precise logical relationship between numerical values, such as addition and subtraction, so it cannot capture the subtle features in the sensor data, which leads to low accuracy and practicality of data analysis. Therefore, how to better capture the subtle features in the sensor data and improve the accuracy and practicality of data analysis is a technical problem that needs to be solved urgently. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a method and device for extracting logical features of sensor data based on translation embedding, so as to eliminate or improve one or more defects existing in the prior art.

[0007] One aspect of the present invention provides a method for extracting logical features of sensor data based on translation embedding, the method comprising:

[0008] Acquire a sensor data sequence for logical feature extraction, and input the sensor data sequence into a trained logical feature extraction model, wherein the sensor data sequence includes monitoring data of multiple time steps monitored by a sensor, and the logical feature extraction model includes a vector embedding module, a relationship building module, and a feature extraction module;

[0009] Based on the vector embedding module, the embedding vector corresponding to each monitoring data in the sensor data sequence is determined; based on each of the embedding vectors, the logical relationship representation between the monitoring data is determined through the relationship construction module; based on each of the embedding vectors and each of the logical relationship representations, the logical feature vector corresponding to each of the monitoring data is generated through the feature extraction module; wherein the logical relationship representation is an arithmetic relationship representation or a directional relationship representation.

[0010] In some embodiments of the present invention, when the logical relationship representation is an arithmetic relationship representation, determining the logical relationship representation between the monitoring data by the relationship construction module based on each of the embedding vectors includes:

[0011] Determine an arithmetic relationship vector, where the arithmetic relationship vector is an addition vector or a subtraction vector;

[0012] Determine the nearest neighbor vector of each of the monitoring data based on each of the embedding vectors and the arithmetic relationship vector;

[0013] The arithmetic relationship vector and the nearest neighbor vector are used to represent the arithmetic relationship between the corresponding monitoring data.

[0014] In some embodiments of the present invention, when the logical relationship representation is a directional relationship representation, determining the logical relationship representation between the monitoring data through the relationship construction module based on each of the embedding vectors includes:

[0015] pass Calculate the projection vector of each embedding vector, and determine the logical relationship representation between the monitoring data through the relationship construction module based on each projection vector; wherein i represents the embedding vector, w r represents the hyperplane parameters, Represents the projection vector.

[0016] In some embodiments of the present invention, determining the logical relationship representation between the monitoring data through the relationship construction module based on each of the projection vectors includes:

[0017] determining an interval relationship vector and a correlation relationship vector;

[0018] Determine an interval vector of each of the monitoring data based on each of the projection vectors and the interval relationship vector;

[0019] The interval relationship vector, the correlation relationship vector and the interval vector are represented as the directional relationship between the corresponding monitoring data.

[0020] In some embodiments of the present invention, the method further comprises:

[0021] Determine sample data of sensor data sequence;

[0022] Construct model loss function and initial relationship vector;

[0023] The initial logical feature extraction model is pre-trained based on the sensor data sequence sample data, the model loss function and the initial relationship vector to obtain a trained logical feature extraction model.

[0024] In some embodiments of the present invention, the sensor data sequence sample data is a data sequence within a preset value range.

[0025] In some embodiments of the present invention, the first model loss function is:

[0026] ;

[0027] in, represents the first model loss, represents the boundary hyperparameter, , ,(i,r,m,j) represents the first correct quadruple, i and j represent the embedding vectors corresponding to the two monitoring data, r represents the arithmetic relationship vector, and m represents the nearest neighbor vector. represents the distance between i+r+m and j, is the first error quadruple randomly generated based on (i, r, m, j).

[0028] In some embodiments of the present invention, the second model loss function is:

[0029]

[0030] ;

[0031] ;

[0032] ;

[0033] in, represents the second model parameter, represents the boundary hyperparameter, β represents the hyperparameter used to balance the importance, , represents the second correct quadruple, represents the projection vector corresponding to the two embedded vectors, represents the interval relation vector, represents an interval vector, express and The distance between Indicates based on A randomly generated second error quadruple, represents the correct triple, represents the projection vector corresponding to the two embedded vectors h and t, represents the correlation vector, Represents the correlation constraints used to construct numerical values. Indicates based on Randomly generated error triplets, represents the transpose of the hyperplane parameters, A fixed hyperparameter (threshold) representing a constraint.

[0034] According to another aspect of the present invention, there is also provided a device for extracting logical features of sensor data based on translation embedding, the device comprising a processor, a memory and a computer program stored in the memory, the processor being used to execute the computer program, and when the computer program is executed, the device implements the steps of the method described in any of the above embodiments.

[0035] According to yet another aspect of the present invention, a computer-readable storage medium is disclosed, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0036] The sensor data logical feature extraction method and device based on translation embedding disclosed in the above embodiment of the present invention determines the embedding vector based on the vector embedding module of the logical feature extraction model, and then determines the logical relationship representation between the monitoring data through the relationship construction module, and finally generates the logical feature vector based on the feature extraction module. This method models the arithmetic relationship (such as addition, subtraction) and directional features (such as intervals and opposite relationships) of numerical values ​​as core features, thereby deeply mining the intrinsic characteristics of sensor data, better capturing the subtle features in sensor data, and enhancing the expressiveness of the model in tasks such as prediction and anomaly detection, thereby improving the accuracy and practicality of data analysis.

[0037] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.

[0038] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention. The components in the drawings are not drawn to scale, but are only for illustrating the principles of the present invention. In order to facilitate the illustration and description of some parts of the present invention, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present invention. In the drawings:

[0040] Figure 1Schematic diagram of the architecture of the time series feature extraction system of the prior art of this application.

[0041] Figure 2 The figure is a flow chart of a method for extracting logical features from sensor data based on translation embedding according to an embodiment of the present invention.

[0042] Figure 3 FIG. 4 is a schematic diagram of the architecture of a logical feature extraction model according to an embodiment of the present invention.

[0043] Figure 4 Schematic diagram of an arithmetic relationship representation of a method for extracting logical features from sensor data according to an embodiment of the present invention.

[0044] Figure 5 The diagram is a schematic diagram showing the directional relationship of a method for extracting logical features from sensor data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0046] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0047] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0048] It should also be noted here that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection with an intermediary, not only to a wired connection, but also to a wireless connection, and the specific connection can be changed based on the actual application scenario.

[0049] like Figure 1As shown in the figure, the existing technology uses the TS2Vec model to extract time series features. In addition to being unable to capture subtle features in sensor data, this method also has the following disadvantages: (1) Prior assumptions about time series data: Although the design of TS2Vec attempts to mitigate the impact of data presets, it is still based on the assumption that the distribution of time series is relatively stable; for example, random cropping and masking techniques may change the temporal relationship of the sequence and affect the performance of certain tasks that rely on continuity and timing. (2) High dependence on computing resources: TS2Vec adopts a hierarchical contrastive learning framework. Although it has shown good performance in multiple tasks, the hierarchical contrast and context consistency require high computing resources; especially when processing long time series or large-scale data sets, the computing cost increases significantly. (3) Model complexity and hyperparameter tuning requirements: TS2Vec's hierarchical contrastive learning and context consistency strategies introduce more hyperparameters, such as mask probability, time period length, contrast loss weight, etc.; and in order to achieve optimal performance, these hyperparameters need to be carefully tuned, which may increase the complexity of deployment and application.

[0050] In view of a series of technical problems existing in the prior art, in order to extract the potential logical features of sensor data and enhance the representation ability of downstream tasks, this application provides a method for extracting logical features of sensor data based on translation embedding. This method is based on the logical feature extraction model (Num2Vec model), which models the arithmetic relationship of numerical values ​​(such as addition, subtraction) and directional features (such as intervals, opposite relationships) as core features, so as to deeply explore the intrinsic characteristics of sensor data; that is, this method can capture the intrinsic logic between numerical values ​​in the vector space according to the type and characteristics of signal data; this application can not only generate rich numerical logical features, but also support the recognition of complex signal patterns, effectively improving the accuracy and stability of downstream tasks.

[0051] Num2Vec translation embedding: Translation embedding treats the relationship between entities as a translation operation, and models entity relationships by embedding entities and relationships in the knowledge graph into a low-dimensional vector space. Num2Vec draws on the idea of ​​translation embedding to model single-valued entities and their logical relationships in sensor data, including arithmetic relationships, angular directions, etc. By converting different numerical relationships into vector operations in the vector space, Num2Vec can capture and represent the potential logic between numerical values, such as the increase, decrease, and directional changes of signal values.

[0052] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0053] Figure 1A method for extracting logical features from sensor data based on translation embedding according to an embodiment of the present application is as follows: Figure 1 As shown, the sensing data logical feature extraction method includes steps S10 and S20.

[0054] Step S10: Obtain a sensor data sequence for logical feature extraction, and input the sensor data sequence into a trained logical feature extraction model, wherein the sensor data sequence includes monitoring data of multiple time steps monitored by the sensor, and the logical feature extraction model includes a vector embedding module, a relationship construction module, and a feature extraction module.

[0055] In this step, the acquired sensor data sequence is the data for actual logical feature extraction, such as the data monitored by the sensor in the past period of time. Figure 3 As shown, the vector embedding module of the logical feature extraction model Num2Vec receives the input data of the model, and the output information of the vector embedding module is used as the input information of the relationship construction module, and the output information of the relationship construction module is used as the input information of the feature extraction module; specifically, the vector embedding module is used to generate an embedding vector from the input data, the relationship construction module is used to realize the relationship construction between different monitoring data, and the feature extraction module is used to extract the logical features of the input data. Exemplarily, the input data of the model can be represented as ={ , ,..., }, where T represents the number of time steps.

[0056] Step S20: Determine the embedding vector corresponding to each monitoring data in the sensor data sequence based on the vector embedding module, determine the logical relationship representation between the monitoring data through the relationship construction module based on each embedding vector, and generate the logical feature vector corresponding to each monitoring data through the feature extraction module based on each embedding vector and each logical relationship representation; wherein the logical relationship representation is an arithmetic relationship representation or a directional relationship representation.

[0057] After receiving the input data X, the embedding vector of the input data is first generated based on the vector embedding module, and then the relationship construction module is used to complete the relationship construction based on the logical characteristics between the monitoring data. The construction of the logical relationship can also be understood as determining the logical relationship representation between the monitoring data. Furthermore, the feature extraction module maps the embedding vector corresponding to the monitoring data to a high-dimensional space based on the constructed logical relationship, and extracts the local or global connection relationship between entities, so as to better capture the internal structural characteristics between the entities; in this step, the entity refers to each monitoring data in the sensor data sequence. Exemplarily, the logical feature output by the feature extraction module is represented as , that is, convert the single-value data of each timestamp into a d-dimensional vector , in order to enhance the expressiveness of data.

[0058] It can be understood that the sensor data sequence can be a sequence with an arithmetic relationship or a sequence with a directional relationship. Therefore, the logical relationship representation can be specifically an arithmetic relationship representation or a directional relationship representation. In this step, the relationship construction module completes the logical relationship construction between the data according to the logical characteristics existing between the monitoring data. The logical relationship construction can be the addition and subtraction relationship of the arithmetic characteristics and the interval and correlation relationship of the directional characteristics. That is, the relationship construction module establishes a corresponding relationship mapping for the input monitoring data entity.

[0059] In some embodiments, when the logical relationship is represented as an arithmetic relationship representation, the logical relationship representation between the monitoring data is determined through the relationship construction module based on each of the embedding vectors, which may specifically include the following steps: determining an arithmetic relationship vector, which is an addition vector or a subtraction vector; determining the nearest neighbor vector of each of the monitoring data based on each of the embedding vectors and the arithmetic relationship vector; and using the arithmetic relationship vector and the nearest neighbor vector as the arithmetic relationship representation between the corresponding monitoring data.

[0060] In the above embodiment, in order to enhance the arithmetic characteristics of the sensing data, addition and subtraction operations are assigned to it to capture the inherent correlation between the values; that is, for a given input data with arithmetic characteristics , treat different single-value data as entities in the knowledge graph and embed them into a high-dimensional space. In this process, two arithmetic relations can be constructed to simulate addition and subtraction operations respectively. Each relation connects three entity vectors to form a four-tuple , where i and j represent the embedding vectors corresponding to the two entities, r represents the vector corresponding to the constructed arithmetic relationship, and m represents the nearest neighbor vector of the corresponding entity calculated based on the two embedding vectors and the arithmetic relationship vector; in this embodiment, the logical feature extraction model processes and optimizes the arithmetic relationship between entities, so that the model can more accurately capture and represent the numerical association features between entities.

[0061] In some other embodiments, when the logical relationship is represented as a directional relationship, determining the logical relationship between the monitoring data through the relationship construction module based on each of the embedding vectors specifically includes the following steps: Calculate the projection vector of each embedding vector, and determine the logical relationship representation between the monitoring data through the relationship construction module based on each projection vector; wherein i represents the embedding vector, w r represents the hyperplane parameters, Represents the projection vector.

[0062] Furthermore, the logical relationship representation between the monitoring data is determined through the relationship construction module based on each of the projection vectors, including: determining an interval relationship vector and a correlation relationship vector; determining an interval vector of each of the monitoring data based on each of the projection vectors and the interval relationship vector; and using the interval relationship vector, the correlation relationship vector and the interval vector as directional relationship representations between corresponding monitoring data.

[0063] Different from arithmetic features, directional features describe the directional attributes between entities, rather than the size. In order to enhance the directional characteristics of the sensing data, intervals and related relationships are assigned to it to extract directional features. For interval relationships, they are determined by interval relationship vectors; and for related relationships, they are specifically determined based on related relationship vectors. In the above embodiment, for a given input data with directional features, , treat different single-value data as entities in the knowledge graph and embed them into high-dimensional space; in addition, in order to avoid mapping different values ​​into the same high-dimensional vector in model training and ensure the realization of multiple relations, the values ​​are first Projection onto a relation-specific hyperplane In, it is recorded as , the corresponding interval relation projection vector is recorded as Similarly, in this process, two relationship vectors, the interval relationship and the correlation relationship, are first constructed; the interval relationship vector It can be seen as an arithmetic feature with the loop attribute added and the size attribute subtracted, so similar to the arithmetic relation vector, the interval relation vector Also connect the three entity vectors, and the resulting quadruple is projected on the hyperplane to obtain the projected quadruple: ,and and The corresponding interval relationships are the same; among them, represents the projection vector corresponding to the two embedded vectors i and j, represents the interval relation projection vector, and Then it represents an interval vector. Represents the reverse direction, thus connecting the two entity vectors to form a triple ,and It has a symmetric property, that is Equivalent to ; In addition, there is a one-to-many / many-to-one problem in the direction relationship, for example, "0°" and "360°" have the same meaning; represents the projection vector corresponding to the two embedded vectors h and t, Represents the correlation vector.

[0064] In some embodiments of the present invention, the sensor data logical feature extraction method based on translation embedding further includes the following steps: determining sensor data sequence sample data; constructing a model loss function and an initial relationship vector; and pre-training an initial logical feature extraction model based on the sensor data sequence sample data, the model loss function and the initial relationship vector to obtain a trained logical feature extraction model. Exemplarily, the sensor data sequence sample data is a data sequence within a preset value range.

[0065] When training a model based on data with an arithmetic relationship, after determining two entities i and j and the additive relationship between them Afterwards, there should be a unique nearest neighbor vector m that should match: During model training, by minimizing the distance between the two sides of the equation Find the nearest neighbor that best fits the arithmetic relationship for each entity to build and optimize the arithmetic association between entities, where d is the square of the Euclidean distance. Finally, a boundary-based ranking loss function (first model loss function) is constructed to optimize the extraction process of arithmetic features:

[0066] ;

[0067] in, , represents the first model loss, represents the boundary hyperparameter, , , (i, r, m, j) represents the first correct quadruple , i and j represent the embedding vectors corresponding to the two monitoring data, r represents the arithmetic relationship vector, and m represents the nearest neighbor vector. represents the distance between i+r+m and j, is the first error quadruple randomly generated based on (i, r, m, j) , the first error quad By first correct quad Randomly replace an entity generation to guide the model to distinguish the correct arithmetic relationship and optimize the feature extraction process more effectively. For example, the arithmetic relationship representation diagram of the sensor data logical feature extraction method is as follows: Figure 4 shown.

[0068] When training the model based on data with directional relationships, the second model loss function is used to optimize the extraction process of directional features:

[0069]

[0070] in, represents the second model parameter, represents the boundary hyperparameter, β represents the hyperparameter used to balance the importance, , represents the second correct quadruple, represents the projection vector corresponding to the two embedded vectors, represents the interval relation vector, represents an interval vector, express and The distance between Indicates based on Randomly generated second error quad. , represents the correct triple, represents the projection vector corresponding to the two embedded vectors h and t, represents the correlation vector, Represents the correlation constraints used to construct numerical values. Indicates based on Randomly generated error triples. f consists of two parts, , f1 constrains the normalization of all numerical vectors, and f2 ensures Exists on a hyperplane, specifically, , represents the transpose of the hyperplane parameters, The fixed hyperparameter (threshold) representing the constraint condition. The schematic diagram of the directional relationship representation of the sensor data logical feature extraction method is as follows Figure 5 shown.

[0071] In the above embodiment, arithmetic and directional feature representations are respectively modeled for sensor data in a pre-trained manner. This logical representation provides rich feature inputs for subsequent downstream tasks, making the system more accurate and robust in tasks such as time series modeling and anomaly detection.

[0072] In some embodiments, the logical feature extraction model is pre-trained in a self-supervised manner based on the first model loss function and the second model loss function to extract the logical relationship features of each timestamp value, thereby obtaining a high-dimensional embedding vector. Num2Vec can not only help data establish feature representations with logical relationships, but also provide support for various downstream tasks and practical applications, enhancing the applicability and interpretability of the model in practical scenarios.

[0073] In a specific embodiment, the sensor data logical feature extraction method is implemented by the A800 40G chip, and the algorithm is implemented using the pytorch framework of the python language. The method is experimented and verified on data collected by multiple environmental monitoring sensors (PM2.5, CO, PM10) and data collected by climate-related sensors (temperature, wind direction, wind speed). The results show that the method can better and more accurately capture the subtle features in the sensor data. And after extracting the corresponding logical features based on this method, it can be used as a constraint to combine with the original values ​​and apply to downstream prediction tasks.

[0074] Compared with the feature extraction method of the prior art, the sensor data logical feature extraction method based on translation embedding disclosed in the above embodiment can capture the potential correlation in the data more deeply, thereby improving the prediction performance of downstream tasks. Experimental results show that Num2Vec can reduce the RMSE (root mean square error) of the prediction task by 3-10% on multiple data sets.

[0075] According to another aspect of the present invention, there is also provided a device for extracting logical features of sensor data based on translation embedding, the device comprising a processor, a memory and a computer program stored in the memory, the processor being used to execute the computer program, and when the computer program is executed, the device implements the steps of the method described in any of the above embodiments.

[0076] Through the above embodiments, it can be found that the method and device for extracting logical features of sensor data based on translation embedding of the present invention, for arithmetic relationship feature extraction, regards each numerical value as an entity, and constructs two arithmetic relations of addition and subtraction, embeds the entity and the relationship into a high-dimensional space, and performs pre-training in a self-supervised manner to capture the potential arithmetic association of the data; for directional relationship feature extraction, by treating numerical data as entities, constructing two directional relations of interval and correlation to reveal the spatial position relationship of the numerical values; by projecting these relations onto a specific relational hyperplane, and using self-supervised learning to perform pre-training to capture the relative position and directionality between numerical values. In summary, the method for extracting logical features of sensor data of the present application can accurately capture the logical representation between numerical values, effectively improving the accuracy and stability of downstream tasks.

[0077] The embodiments of the present invention also provide a computer-readable storage medium and a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0078] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is 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 the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0079] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0080] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0081] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for extracting logical features from sensor data based on translation embedding, characterized in that: The method comprises: Acquire a sensor data sequence for logical feature extraction, and input the sensor data sequence into a trained logical feature extraction model, wherein the sensor data sequence includes monitoring data of multiple time steps monitored by a sensor, and the logical feature extraction model includes a vector embedding module, a relationship building module, and a feature extraction module; Determine the embedding vector corresponding to each monitoring data in the sensor data sequence based on the vector embedding module, determine the logical relationship representation between the monitoring data based on each embedding vector through the relationship construction module, and generate the logical feature vector corresponding to each monitoring data through the feature extraction module based on each embedding vector and each logical relationship representation; wherein the logical relationship representation is an arithmetic relationship representation or a directional relationship representation; Determine sample data of sensor data sequence; Construct model loss function and initial relationship vector; Pre-training the initial logical feature extraction model based on the sensor data sequence sample data, the model loss function and the initial relationship vector to obtain a trained logical feature extraction model; When the logical relationship representation is an arithmetic relationship representation, determining the logical relationship representation between the monitoring data through the relationship construction module based on each of the embedding vectors includes: Determine an arithmetic relationship vector, where the arithmetic relationship vector is an addition vector or a subtraction vector; Determine the nearest neighbor vector of each of the monitoring data based on each of the embedding vectors and the arithmetic relationship vector; Representing the arithmetic relationship vector and the nearest neighbor vector as the arithmetic relationship between corresponding monitoring data; The loss function of the first model is: ; in, represents the first model loss, represents the boundary hyperparameter, , ,(i,r,m,j) represents the first correct quadruple, i and j represent the embedding vectors corresponding to the two monitoring data, r represents the arithmetic relationship vector, and m represents the nearest neighbor vector. represents the distance between i+r+m and j, is the first error quadruple randomly generated based on (i, r, m, j).

2. The method for extracting logical features from sensor data based on translation embedding according to claim 1, characterized in that: When the logical relationship representation is a directional relationship representation, determining the logical relationship representation between the monitoring data through the relationship construction module based on each of the embedding vectors includes: pass Calculate the projection vector of each embedding vector, and determine the logical relationship representation between the monitoring data through the relationship construction module based on each projection vector; wherein i represents the embedding vector, w r represents the hyperplane parameters, Represents the projection vector.

3. The method for extracting logical features from sensor data based on translation embedding according to claim 2, characterized in that: Determining the logical relationship representation between the monitoring data through the relationship building module based on each of the projection vectors includes: determining an interval relationship vector and a correlation relationship vector; Determine an interval vector of each of the monitoring data based on each of the projection vectors and the interval relationship vector; The interval relationship vector, the correlation relationship vector and the interval vector are represented as the directional relationship between the corresponding monitoring data.

4. The method for extracting logical features from sensor data based on translation embedding according to claim 3, characterized in that: The sensor data sequence sample data is a data sequence within a preset value range.

5. The method for extracting logical features from sensor data based on translation embedding according to claim 4, characterized in that: The loss function of the second model is: ; ; ; in, represents the second model parameter, represents the boundary hyperparameter, β represents the hyperparameter used to balance the importance, , represents the second correct quadruple, represents the projection vector corresponding to the two embedded vectors, represents the interval relation vector, represents an interval vector, express and The distance between Indicates based on A randomly generated second error quadruple, represents the correct triple, represents the projection vector corresponding to the two embedded vectors h and t, represents the correlation vector, Represents the correlation constraints used to construct numerical values. Indicates based on Randomly generated error triplets, represents the transpose of the hyperplane parameters, Hyperparameter threshold representing the constraint.

6. A device for extracting logical features of sensor data based on translation embedding, the device comprising a processor, a memory and a computer program stored in the memory, characterized in that: The processor is used to execute the computer program. When the computer program is executed, the device implements the steps of the method according to any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Man-machine perception and decision-making method based on generalized driving behavior map

    CN118839588A