Method, device, equipment and storage medium for extracting information from an Internet of Things terminal

By using the encoding and decoding parts in the IoT terminal information extraction model to process user agent information and generate accurate IoT terminal information, the problem of difficulty in matching terminal information in the existing technology is solved and the accuracy of IoT information analysis is improved.

CN112800043BActive Publication Date: 2024-12-27GUANGDONG KAITONG SOFTWARE DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110162802.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-05
Publication Date
2024-12-27
Estimated Expiration
2041-02-05

AI Technical Summary

Technical Problem

In the prior art, the extraction method of IoT terminal information mainly relies on regular matching method, which leads to the difficulty of accurately matching terminal information in the absence of unified norms and large differences between manufacturers, which hinders further analysis of IoT information.

Method used

Using an IoT terminal information extraction method, the client's user agent information is obtained through the server, and input it into the preset target information extraction model. The encoding part extracts the output information and hidden layer information, and the decoding part generates it according to the start flag. The information to be spliced ​​is finally spliced ​​into the Internet of Things terminal information and returned to the client. The model includes data preprocessing components and recurrent neural networks, and adjusts model parameters through training data to generate accurate terminal information.

Benefits of technology

It realizes accurate matching and identification of IoT terminal information, solves the shortcomings of regular matching methods, and improves the analysis capabilities of IoT information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112800043B_ABST
    Figure CN112800043B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for extracting information from an Internet of Things terminal, which is applied to a server, wherein the server is connected to a client in communication, and the method comprises: obtaining user agent information corresponding to the client; inputting the user agent information into a preset target information extraction model; wherein the target information extraction model comprises an encoding part and a decoding part; extracting output information and hidden layer information from the user agent information through the encoding part; when receiving a start mark sent by the client, generating multiple information to be spliced ​​according to the start mark, output information and hidden layer information through the decoding part; splicing multiple information to be spliced, generating Internet of Things terminal information and returning it to the client. Thus, the Internet of Things terminal can be more accurately matched and identified, which is conducive to further analysis of Internet of Things information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of terminal information extraction, and in particular to a method, device, equipment and storage medium for extracting terminal information of an Internet of Things. Background Art

[0002] Currently, most methods for extracting terminal information in the Internet of Things are regular matching methods. Regular matching methods study the location of terminal information in UA (User Agent) in advance, and write regular expressions to match terminal information according to the location, general rules or industry protocols. Regular expression methods are more suitable for Web fields where terminal information has clear specifications, and perform terminal analysis on the requested UA.

[0003] However, there is no overall unified standard for IoT UA, and each manufacturer has its own standard, but the standards between manufacturers vary greatly. If a new manufacturer or new terminal appears, it is very likely that some regular expressions need to be added or rewritten, and maintenance is also very difficult. As a result, the terminal information often cannot be matched during ETL (Extract-Transform-Load, data warehouse technology), and the terminal cannot be accurately identified, which hinders the further analysis of IoT information. Summary of the invention

[0004] The present invention provides a method, device, equipment and storage medium for extracting information of an Internet of Things terminal, which solves the technical problem that the conventional regular matching method for an Internet of Things UA causes the terminal information to be unable to be accurately matched, the terminal is difficult to be accurately identified, and further analysis of the Internet of Things information is not conducive.

[0005] A first aspect of the present invention provides a method for extracting information from an Internet of Things terminal, which is applied to a server, wherein the server is communicatively connected to a client, and the method comprises:

[0006] Obtaining user agent information corresponding to the client;

[0007] Inputting the user agent information into a preset target information extraction model; wherein the target information extraction model includes an encoding part and a decoding part;

[0008] Extracting output information and hidden layer information from the user agent information through the encoding part;

[0009] When receiving the start mark sent by the client, the decoding part generates a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information;

[0010] Splice a plurality of the information to be spliced, generate IoT terminal information and return it to the client.

[0011] Optionally, the encoding part includes a data preprocessing component and a first recurrent neural network, and the step of extracting output information and hidden layer information from the user agent information through the encoding part includes:

[0012] Performing data preprocessing operations on the user agent information by the data preprocessing component to obtain a vector to be extracted;

[0013] The vector to be extracted is input into the first recurrent neural network to obtain output information and hidden layer information.

[0014] Optionally, the step of performing a data preprocessing operation on the user agent information by the data preprocessing component to obtain a vector to be extracted includes:

[0015] Performing data cleaning on the user agent information through the data cleaning layer to generate cleaned data;

[0016] The cleaned data is converted into a vector to be extracted through the word embedding layer.

[0017] Optionally, the decoding part includes an attention component and a second recurrent neural network, and when the start mark sent by the client is received, the decoding part generates a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information, including:

[0018] When receiving the start mark sent by the client, the attention component concatenates the start mark and the hidden layer information and performs linear transformation to generate transformation information;

[0019] Determining, by the attention component, attention information corresponding to the user agent information according to an inner product result of the transformation information and the output information;

[0020] Inputting the attention information into the second recurrent neural network to obtain intermediate information and recurrent hidden layer information;

[0021] Updating the output information and the start flag to the intermediate information, updating the hidden layer information to the cyclic hidden layer information, and jumping to the step of concatenating the start flag and the hidden layer information through the attention component and performing linear transformation to generate transformation information, until a predetermined amount of the intermediate information is obtained;

[0022] All the intermediate information is extracted to obtain a plurality of information to be spliced.

[0023] Optionally, it also includes:

[0024] Get training data;

[0025] The training data is used to train a preset initial information extraction model to obtain a target information extraction model.

[0026] Optionally, the step of using the training data to train a preset initial information extraction model to obtain a target information extraction model includes:

[0027] Inputting the training data into the preset initial information extraction model to obtain extracted information and its classification probability;

[0028] Constructing a loss function and calculating a loss value according to the extracted information and the classification probability;

[0029] If the loss value is greater than a preset threshold, the target information extraction model is generated.

[0030] Optionally, it also includes:

[0031] If the loss function is less than the preset threshold, the model parameters of the initial information extraction model are adjusted using the gradient descent method;

[0032] Jump to execute the step of inputting the training data into the preset initial information extraction model to obtain the extracted information and its classification probability, until the loss function is greater than the preset threshold, and obtain the target information extraction model.

[0033] A second aspect of the present invention provides an IoT terminal information extraction device, which is applied to a server, the server is communicatively connected with a client, and the device comprises:

[0034] A user agent information acquisition module, used to obtain the user agent information corresponding to the client;

[0035] An information input module, used to input the user agent information into a preset target information extraction model; wherein the target information extraction model includes an encoding part and a decoding part;

[0036] An information extraction module, used for extracting output information and hidden layer information from the user agent information through the encoding part;

[0037] An information decoding module, configured to generate a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information through the decoding part when receiving the start mark sent by the client;

[0038] The information splicing module is used to splice multiple pieces of information to be spliced, generate Internet of Things terminal information and return it to the client.

[0039] The third aspect of the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the Internet of Things terminal information extraction method as described in any one of the first aspect of the present invention.

[0040] The fourth aspect of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by the processor, the method for extracting information from an Internet of Things terminal as described in any one of the first aspects of the present invention is implemented.

[0041] It can be seen from the above technical solutions that the present invention has the following advantages:

[0042] The present invention obtains the user agent information corresponding to the client through the server, inputs the user agent information into the preset target information extraction model, extracts the user agent information through the encoding part, and obtains the output information and the hidden layer information; after receiving the start mark sent by the client, the output information, the hidden layer information and the start mark are used for information prediction through the decoding part to generate multiple information to be spliced; the multiple information to be spliced ​​are spliced ​​to generate the Internet of Things terminal information and return it to the client. Thus, the existing technical problems that the regular matching method used for the Internet of Things UA cannot accurately match the terminal information, it is difficult to accurately identify the terminal, and it is not conducive to the further analysis of the Internet of Things information are solved, and the Internet of Things terminals are more accurately matched and identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 A flowchart of a method for extracting information from an Internet of Things terminal provided in Embodiment 1 of the present invention;

[0045] Figure 2 A flowchart of a method for extracting information from an Internet of Things terminal provided in Embodiment 2 of the present invention;

[0046] Figure 3 A schematic diagram of a training process of a target information extraction model provided in Embodiment 2 of the present invention;

[0047] Figure 4 A schematic diagram of a decoding process provided in Embodiment 2 of the present invention;

[0048] Figure 5This is a structural block diagram of an Internet of Things terminal information extraction device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0049] The embodiments of the present invention provide a method, device, equipment and storage medium for extracting information of an Internet of Things terminal, which are used to solve the technical problem that the conventional regular matching method for an Internet of Things UA causes the terminal information to be unable to be accurately matched, the terminal is difficult to be accurately identified, and further analysis of the Internet of Things information is not conducive.

[0050] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] See also Figure 1 , Figure 1 A flowchart of the steps of a method for extracting information from an Internet of Things terminal provided in Embodiment 1 of the present invention.

[0052] The present invention provides a method for extracting information from an Internet of Things terminal, which is applied to a server, wherein the server is connected to a client for communication, and the method comprises the following steps:

[0053] Step 101, obtaining user agent information corresponding to the client;

[0054] User agent information refers to User Agent, referred to as UA, which is a special string header that enables the server to identify the operating system and version, CPU type, browser and version, browser rendering engine, browser language, browser plug-ins, etc. used by the client.

[0055] In an embodiment of the present invention, when a user needs to extract the Internet of Things terminal information of a client, the corresponding user agent information can be obtained from the client through the server.

[0056] Step 102, inputting the user agent information into a preset target information extraction model; wherein the target information extraction model includes an encoding part and a decoding part;

[0057] After the user agent information is obtained, the user agent information is input into a preset target information extraction model to extract the Internet of Things terminal information in the user agent information, wherein the target information extraction model includes an encoding part and a decoding part.

[0058] Step 103, extracting output information and hidden layer information from the user agent information through the encoding part;

[0059] The user agent information is extracted through the encoding part in the target information extraction model to obtain the output information and hidden layer information.

[0060] Step 104, when receiving the start mark sent by the client, generating a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information by the decoding part;

[0061] After obtaining the output information and hidden layer information of the encoding part, if the start mark input by the user from the client is received, the output information and the hidden layer information can be decoded. The decoding part performs further decoding prediction based on the start mark, the output information and the hidden layer information, and generates multiple information to be spliced.

[0062] Step 105, splicing a plurality of the information to be spliced, generating IoT terminal information and returning it to the client.

[0063] In a specific implementation, after obtaining multiple pieces of information to be spliced, the multiple pieces of information to be spliced ​​can be spliced ​​in output order to obtain IoT terminal information, and the IoT terminal information is returned to the client to facilitate subsequent further analysis of the client.

[0064] In the embodiment of the present invention, the user agent information corresponding to the client is obtained through the server, and the user agent information is input into the preset target information extraction model, so as to extract the user agent information through the encoding part thereof, and obtain the output information and the hidden layer information; after receiving the start mark sent by the client, the output information, the hidden layer information and the start mark are used for information prediction through the decoding part to generate multiple information to be spliced; the multiple information to be spliced ​​are spliced ​​to generate the Internet of Things terminal information and return it to the client. Thus, the technical problem that the terminal information cannot be accurately matched, the terminal is difficult to accurately identify, and the further analysis of the Internet of Things information caused by the regular matching method for the Internet of Things UA is solved, and the Internet of Things terminals are more accurately matched and identified.

[0065] See also Figure 2 , Figure 2 A flowchart of the steps of a method for extracting information from an Internet of Things terminal provided in Embodiment 2 of the present invention.

[0066] The present invention provides a method for extracting information from an Internet of Things terminal, which is applied to a server, wherein the server is connected to a client for communication, and the method comprises the following steps:

[0067] Step 201, obtaining training data;

[0068] Training data refers to user agent information that has been converted into a vector through a word embedding layer after data cleaning. The training data has different first annotations [sep] and second annotations [cls] at the beginning and end of the terminal name. Data that does not contain a terminal name is annotated with a third annotation, such as [None]. For some training data that contain terminals from multiple different manufacturers or different models, it is believed that these may have problems with training data falsification and are annotated as [may problem].

[0069] Step 202: Use the training data to train a preset initial information extraction model to obtain a target information extraction model.

[0070] Optionally, step 202 may include the following sub-steps:

[0071] Inputting the training data into the preset initial information extraction model to obtain extracted information and its classification probability;

[0072] Constructing a loss function and calculating a loss value according to the extracted information and the classification probability;

[0073] If the loss value is greater than a preset threshold, the target information extraction model is generated.

[0074] In an embodiment of the present invention, the training data is input into a preset initial information extraction model, the encoding of the ASCII code table is used as the encoding code table of the model, the training data is converted into a vector through a word embedding layer, and the vector is input into a recurrent neural network GRU for information extraction to obtain the output information and hidden layer information of the GRU; the extracted information and the hidden layer information are input into a decoder for a decoding process.

[0075] In the actual training process, at the beginning of training, the model cannot predict what the next word will be after the start tag is given. If the model prediction result is directly used to pass the model to predict the next word, it will deviate greatly from the actual data, which is not conducive to the training of the model. Therefore, it is necessary to use the Teacher Force method in the training of the first n Epochs. That is, regardless of the model's prediction results, the real results are forced to be input into the model to guide the training of the model, and the Teacher Force is ended when the training set is 95% accurate. Finally, NllLoss (Negative Log Likelihood Loss) is used as the loss function to guide the gradient descent process of the model. The NllLoss formula is as follows:

[0076] loss(p,x)=-∑ * x*log(p)

[0077] Among them, x is the classification category, and p is the probability of classification as x.

[0078] It is worth mentioning that you can also enter an end flag to exit the decoding loop of the model.

[0079] Furthermore, step 202 may also include the following sub-steps:

[0080] If the loss function is less than the preset threshold, the model parameters of the initial information extraction model are adjusted using the gradient descent method;

[0081] Jump to execute the step of inputting the training data into the preset initial information extraction model to obtain the extracted information and its classification probability, until the loss function is greater than the preset threshold, and obtain the target information extraction model.

[0082] Optionally, after obtaining the target information extraction model, additional verification data can be input. After the verification data is extracted through the target information extraction model, if the obtained IoT terminal information is exactly the same as the real terminal information corresponding to the verification data, it means that the target information extraction model has been trained; if there is a difference, continue model training.

[0083] See also Figure 3 , Figure 3 A schematic diagram of the training process of a target information extraction model provided in Embodiment 2 of the present invention.

[0084] In an embodiment of the present invention, the initial information extraction model is an Encoder-Decoder encoding-decoding structure. In the encoding part Encoder, the user agent information Input is received, and the user agent information is converted into a vector through the word embedding layer Embedding, and the vector is input into the recurrent neural network GRU to obtain the output information Out and the hidden layer information Hidden and input them into the decoding part Decoder; when the attention component Attention receives the start mark Start tocken, the output information Out and the hidden layer information Hidden, the attention information is obtained and input into the recurrent neural network GRU, the hidden layer information Hidden and the intermediate information Tocken are output and input into the attention component Attention again, and after a predetermined number of times, multiple intermediate information Tocken are obtained as Output, and after splicing, the Internet of Things terminal information Target is obtained.

[0085] Optionally, the Teacher Force method is used in the training of the first n Epochs. That is, regardless of the prediction result of the model, the real result Target is forced to be input into the recurrent neural network GRU to guide the training of the model to obtain the target information extraction model.

[0086] Step 203, obtaining user agent information corresponding to the client;

[0087] Step 204, inputting the user agent information into a preset target information extraction model; wherein the target information extraction model includes an encoding part and a decoding part;

[0088] In the embodiment of the present invention, the specific implementation process of steps 203-204 is similar to the above steps 101-102, and will not be repeated here.

[0089] Step 205, extracting output information and hidden layer information from the user agent information through the encoding part;

[0090] In an example of the present invention, the encoding part includes a data preprocessing component and a first recurrent neural network, and step 205 may include the following sub-steps S11-S12:

[0091] S11, performing a data preprocessing operation on the user agent information by the data preprocessing component to obtain a vector to be extracted;

[0092] Furthermore, step S11 may include the following sub-steps:

[0093] Performing data cleaning on the user agent information through the data cleaning layer to generate cleaned data;

[0094] The cleaned data is converted into a vector to be extracted through the word embedding layer.

[0095] Data cleaning refers to the process of re-examining and verifying data, with the aim of removing duplicate information, correcting existing errors, and providing data consistency. Specifically, it can include checking data consistency and handling invalid and missing values.

[0096] In an embodiment of the present invention, since the user agent information should not contain characters other than ASCII codes, data cleaning can be performed on the user agent information to obtain cleaned data, and then the cleaned data is converted using a word embedding layer to obtain a vector to be extracted.

[0097] S12: Input the vector to be extracted into the first recurrent neural network to obtain output information and hidden layer information.

[0098] Step 206, when receiving the start mark sent by the client, generating a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information by the decoding part;

[0099] In another example of the present invention, the decoding part includes an attention component and a second recurrent neural network, and step 206 may include the following sub-steps:

[0100] When receiving the start mark sent by the client, the attention component concatenates the start mark and the hidden layer information and performs linear transformation to generate transformation information;

[0101] Determining, by the attention component, attention information corresponding to the user agent information according to an inner product result of the transformation information and the output information;

[0102] Inputting the attention information into the second recurrent neural network to obtain intermediate information and recurrent hidden layer information;

[0103] Updating the output information and the start flag to the intermediate information, updating the hidden layer information to the cyclic hidden layer information, and jumping to the step of concatenating the start flag and the hidden layer information through the attention component and performing linear transformation to generate transformation information, until a predetermined amount of the intermediate information is obtained;

[0104] All the intermediate information is extracted to obtain a plurality of information to be spliced.

[0105] In an embodiment of the present invention, when a start mark sent by a client is received, the start mark and hidden layer information are spliced ​​together through an attention component, and the spliced ​​information is linearly transformed to generate transformation information; an inner product is performed on the transformation information and the output information to obtain an inner product result, and the attention information corresponding to the user agent information is determined; the attention information is input into a second recurrent neural network to obtain intermediate information and recurrent hidden layer information; the output information and the start mark are updated to the intermediate information, and the hidden layer information is updated to the recurrent hidden layer information, and after repeating the above steps, multiple intermediate information are obtained, and the multiple intermediate information are determined as multiple information to be spliced.

[0106] See also Figure 4 , Figure 4 A schematic diagram of the decoding process in an embodiment of the present invention is shown.

[0107] When the decoder receives the output information and the hidden layer information, it concatenates the start mark and the hidden layer information and performs a linear transformation. The transformed information is inner-producted with the output information to obtain the attention information in the training data. The attention information is input into the GRU for decoding to obtain the first character H and the first hidden layer information corresponding to the first character. The first character and the first hidden layer information are input into the GRU model for the same operation. After a predetermined number of cycles, multiple characters H, u, a, W, e and i are obtained. The multiple characters are concatenated to obtain the extracted information HuaWei.

[0108] Step 207, splicing a plurality of the information to be spliced, generating IoT terminal information and returning it to the client.

[0109] After obtaining multiple information to be spliced, each information to be spliced ​​is spliced ​​according to the output order of the information to be spliced ​​to obtain the Internet of Things terminal information, and the Internet of Things terminal information is returned to the client for display, so as to facilitate subsequent processing of the Internet of Things terminal information.

[0110] In the embodiment of the present invention, the user agent information corresponding to the client is obtained through the server, and the user agent information is input into the preset target information extraction model, so as to extract the user agent information through the encoding part thereof, and obtain the output information and the hidden layer information; after receiving the start mark sent by the client, the output information, the hidden layer information and the start mark are used for information prediction through the decoding part to generate multiple information to be spliced; the multiple information to be spliced ​​are spliced ​​to generate the Internet of Things terminal information and return it to the client. Thus, the technical problem that the terminal information cannot be accurately matched, the terminal is difficult to accurately identify, and the further analysis of the Internet of Things information caused by the regular matching method for the Internet of Things UA is solved, and the Internet of Things terminals are more accurately matched and identified.

[0111] See also Figure 5 , Figure 5 This is a structural block diagram of an Internet of Things terminal information extraction device provided in Example 3 of the present invention.

[0112] The present invention provides an Internet of Things terminal information extraction device, which is applied to a server, the server is connected to a client for communication, and the device comprises:

[0113] A user agent information acquisition module 501 is used to acquire user agent information corresponding to the client;

[0114] The information input module 502 is used to input the user agent information into a preset target information extraction model; wherein the target information extraction model includes an encoding part and a decoding part;

[0115] An information extraction module 503, used to extract output information and hidden layer information from the user agent information through the encoding part;

[0116] The information decoding module 504 is used for generating a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information through the decoding part when receiving the start mark sent by the client;

[0117] The information splicing module 505 is used to splice the multiple pieces of information to be spliced, generate IoT terminal information and return it to the client.

[0118] Optionally, the encoding part includes a data preprocessing component and a first recurrent neural network, and the information extraction module 503 includes:

[0119] A vector conversion submodule to be extracted, configured to perform a data preprocessing operation on the user agent information through the data preprocessing component to obtain a vector to be extracted;

[0120] The vector input submodule is used to input the vector to be extracted into the first recurrent neural network to obtain output information and hidden layer information.

[0121] Optionally, the vector conversion submodule to be extracted includes:

[0122] A data cleaning unit, configured to perform data cleaning on the user agent information through the data cleaning layer to generate cleaned data;

[0123] A data conversion unit is used to convert the cleaned data into a vector to be extracted through the word embedding layer.

[0124] Optionally, the decoding part includes an attention component and a second recurrent neural network, and the information decoding module 504 includes:

[0125] A transformation information generation submodule, for generating transformation information by concatenating the start mark and the hidden layer information through the attention component and performing linear transformation upon receiving the start mark sent by the client;

[0126] an attention information determination submodule, configured to determine, by the attention component, attention information corresponding to the user agent information according to an inner product result of the transformation information and the output information;

[0127] An attention information input submodule, used to input the attention information into the second recurrent neural network to obtain intermediate information and recurrent hidden layer information;

[0128] An information updating submodule, used for updating the output information and the start flag to the intermediate information, updating the hidden layer information to the cyclic hidden layer information, and jumping to execute the step of concatenating the start flag and the hidden layer information through the attention component and performing linear transformation to generate transformation information, until a predetermined amount of the intermediate information is obtained;

[0129] The intermediate information extraction submodule is used to extract all the intermediate information to obtain a plurality of information to be spliced.

[0130] Optionally, it also includes:

[0131] A training data acquisition module, used to acquire training data;

[0132] The training module is used to train a preset initial information extraction model using the training data to obtain a target information extraction model.

[0133] Optionally, the training module includes:

[0134] An extracted information generation submodule, used for inputting the training data into the preset initial information extraction model to obtain the extracted information and its classification probability;

[0135] A loss function construction submodule, used to construct a loss function and calculate a loss value according to the extracted information and the classification probability;

[0136] The first model determination submodule is used to generate the target information extraction model if the loss value is greater than a preset threshold.

[0137] Optionally, the training module further includes:

[0138] A parameter adjustment submodule, used for adjusting the model parameters of the initial information extraction model by using a gradient descent method if the loss function is less than the preset threshold;

[0139] The second model determination submodule is used to jump to the step of inputting the training data into the preset initial information extraction model to obtain the extracted information and its classification probability, until the loss function is greater than the preset threshold, to obtain the target information extraction model.

[0140] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method for extracting information from an Internet of Things terminal as described in any embodiment of the present invention.

[0141] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by the processor, the method for extracting information from an Internet of Things terminal as described in any embodiment of the present invention is implemented.

[0142] 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 and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0143] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the 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.

[0144] 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.

[0145] In addition, each functional unit in each embodiment of the present invention 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.

[0146] If the integrated 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 technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0147] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those 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 thereof may be replaced by equivalents. However, these 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 invention.

Claims

1. A method for extracting information from an Internet of Things terminal, characterized in that: Applied to a server, the server being in communication connection with a client, the method comprising: Obtaining user agent information corresponding to the client; Inputting the user agent information into a preset target information extraction model; wherein the target information extraction model includes an encoding part and a decoding part; Extracting output information and hidden layer information from the user agent information through the encoding part; When receiving the start mark sent by the client, the decoding part generates a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information; Splicing a plurality of the information to be spliced, generating IoT terminal information and returning the information to the client; The decoding part includes an attention component and a second recurrent neural network. When a start mark sent by the client is received, the decoding part generates a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information, including: When receiving the start mark sent by the client, the attention component concatenates the start mark and the hidden layer information and performs linear transformation to generate transformation information; Determining, by the attention component, attention information corresponding to the user agent information according to an inner product result of the transformation information and the output information; Inputting the attention information into the second recurrent neural network to obtain intermediate information and recurrent hidden layer information; Updating the output information and the start flag to the intermediate information, updating the hidden layer information to the cyclic hidden layer information, and jumping to the step of concatenating the start flag and the hidden layer information through the attention component and performing linear transformation to generate transformation information, until a predetermined amount of the intermediate information is obtained; All the intermediate information is extracted to obtain a plurality of information to be spliced.

2. The method for extracting information from an Internet of Things terminal according to claim 1, characterized in that: The encoding part includes a data preprocessing component and a first recurrent neural network, and the step of extracting output information and hidden layer information from the user agent information through the encoding part includes: Performing data preprocessing operations on the user agent information by the data preprocessing component to obtain a vector to be extracted; The vector to be extracted is input into the first recurrent neural network to obtain output information and hidden layer information.

3. The method for extracting information from an Internet of Things terminal according to claim 2, characterized in that: The data preprocessing component includes a data cleaning layer and a word embedding layer. The step of performing a data preprocessing operation on the user agent information by the data preprocessing component to obtain a vector to be extracted includes: Performing data cleaning on the user agent information through the data cleaning layer to generate cleaned data; The cleaned data is converted into a vector to be extracted through the word embedding layer.

4. The method for extracting information from an Internet of Things terminal according to claim 1, characterized in that: Also includes: Get training data; The training data is used to train a preset initial information extraction model to obtain a target information extraction model.

5. The method for extracting information from an Internet of Things terminal according to claim 4, characterized in that: The step of using the training data to train a preset initial information extraction model to obtain a target information extraction model comprises: Inputting the training data into the preset initial information extraction model to obtain extracted information and its classification probability; Constructing a loss function and calculating a loss value according to the extracted information and the classification probability; If the loss value is greater than a preset threshold, the target information extraction model is generated.

6. The method for extracting information from an Internet of Things terminal according to claim 5, characterized in that: Also includes: If the loss function is less than the preset threshold, the model parameters of the initial information extraction model are adjusted using the gradient descent method; Jump to execute the step of inputting the training data into the preset initial information extraction model to obtain the extracted information and its classification probability, until the loss function is greater than the preset threshold, and obtain the target information extraction model.

7. An Internet of Things terminal information extraction device, characterized in that: Applied to a server, the server is connected to a client for communication, and the device comprises: A user agent information acquisition module, used to obtain the user agent information corresponding to the client; An information input module, used to input the user agent information into a preset target information extraction model; wherein the target information extraction model includes an encoding part and a decoding part; An information extraction module, used for extracting output information and hidden layer information from the user agent information through the encoding part; An information decoding module, configured to generate a plurality of information to be spliced ​​according to the start mark, the output information and the hidden layer information through the decoding part when receiving the start mark sent by the client; An information splicing module, used for splicing a plurality of the information to be spliced, generating IoT terminal information and returning it to the client; The decoding part includes an attention component and a second recurrent neural network, and the information decoding module includes: A transformation information generation submodule, for generating transformation information by concatenating the start mark and the hidden layer information through the attention component and performing linear transformation upon receiving the start mark sent by the client; an attention information determination submodule, configured to determine, by the attention component, attention information corresponding to the user agent information according to an inner product result of the transformation information and the output information; An attention information input submodule, used to input the attention information into the second recurrent neural network to obtain intermediate information and recurrent hidden layer information; An information updating submodule, used for updating the output information and the start flag to the intermediate information, updating the hidden layer information to the cyclic hidden layer information, and jumping to execute the step of concatenating the start flag and the hidden layer information through the attention component and performing linear transformation to generate transformation information, until a predetermined amount of the intermediate information is obtained; The intermediate information extraction submodule is used to extract all the intermediate information to obtain a plurality of information to be spliced.

8. An electronic device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method for extracting information from an Internet of Things terminal as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for extracting information from an Internet of Things terminal as described in any one of claims 1 to 6 is implemented.