Internet of Things service discovery method based on user demands

Through Bi-LSTM network and weight calculation method, the problem that user needs in the Internet of Things environment are difficult to capture in real time is solved, the accuracy and user experience of service matching are improved, and efficient service discovery is achieved in dynamic environments.

CN119254652APending Publication Date: 2025-01-03CHONGQING SHOUXUN TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411359616.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the Internet of Things environment, it is difficult to accurately capture user personalized service needs in real time, and the service quality fluctuates with the network environment, resulting in low matching accuracy between users and services and poor user experience.

Method used

The user demand prediction model based on Bi-LSTM network is adopted, and the service quality weight value is calculated by combining the hierarchical analysis method and the entropy value method, and the users are matched with services that meet the needs through the TOPSIS multi-attribute decision-making method.

Benefits of technology

It improves the accuracy and user experience of service matching, and can capture user service quality needs in real time in a dynamically changing IoT environment, improving the accuracy of service discovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254652A_ABST
    Figure CN119254652A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of Internet of Things, and particularly relates to a user demand-based Internet of Things service discovery method, which comprises the following steps of: obtaining historical service request data of a user, and establishing an input sample data set; based on a Bi-LSTM network, constructing a user demand prediction model; according to the service quality demand of the user, calculating a first weight value of the user for the service quality demand through an analytic hierarchy process; according to the service quality evaluation index, calculating a second weight value of the user for the service quality demand through an entropy method; according to the first weight value and the second weight value of the user on the service quality, calculating a mixed weight value of service quality evaluation by adopting an arithmetic average method; according to the mixed weight value, a TOPSIS multi-attribute decision-making method is adopted to match the service meeting the requirements of the user for the user, and a service discovery result is generated, and the scheme can match the service meeting the requirements of the user for the user in the dynamically changing Internet of Things environment, so that the service matching accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet of Things, and in particular relates to an Internet of Things service discovery method based on user needs. Background Art

[0002] As the number and types of IoT services increase, more and more similar services can meet the different needs of users. However, the purpose of service discovery is to match users with service information that meets their needs, and users' preferences for service quality play a key role in determining the success rate of the matching process. Unlike Internet services, in the field of IoT, service quality often changes dynamically due to the diversity of hardware resources and network environments. In addition, different vendors provide different services for the same function, which causes trouble for some users with different service quality requirements. Therefore, when faced with many environments with similar functions but different service quality, it becomes more critical to select service information that meets user needs.

[0003] At present, in order to select service information that meets user needs from many IoT services with the same functions, a series of service discovery technologies based on user needs and semantic mining methods are adopted, such as: clustering-based semantic service selection and user preference model, which enables users to select services that are exactly consistent with their needs from the discovered service library, thereby improving the accuracy of service discovery; a QoS-based situational service discovery method to improve the accuracy of service discovery. The model achieves this goal by establishing an association between the similarity of users' functional and non-functional service requirements and the discovery of services that meet their needs; in order to solve the problem of information islands in the field of Web services, a fast network service discovery framework based on semantic mining and indexing is adopted. The model is equipped with a highly accurate network service matching engine, providing a brand-new solution to ensure the speed and accuracy of service discovery.

[0004] However, there is currently too much information about users' personalized service needs, while there is a lack of unified and standardized descriptions of these needs. Therefore, capturing users' personalized preferences accurately in real time over time poses many challenges. In addition, in the IoT environment, the quality of IoT services objectively fluctuates with the fluctuations of the network environment, making it challenging to measure users' service quality needs with objective measures of existing service quality. This inevitably leads to low matching accuracy between users and services, and poor overall user service experience. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides an Internet of Things service discovery method based on user needs to solve the problem that it is difficult to accurately capture users' personalized preferences in real time in the existing Internet of Things environment. In addition, in the Internet of Things environment, the quality of Internet of Things services will objectively fluctuate with the fluctuation of the network environment, making it challenging to measure users' demand for service quality with objective measurement indicators of existing service quality. This inevitably leads to low matching accuracy between users and services, and poor overall user service experience.

[0006] The technical solution adopted by the present invention is as follows: a method for discovering Internet of Things services based on user needs, comprising the following steps:

[0007] S100, obtaining historical service request data of the user, preprocessing the historical service request data, screening several service quality evaluation indicators related to user needs, and establishing an input sample data set;

[0008] S200, based on the Bi-LSTM network, takes the service quality evaluation index as the input of the input layer and the user's service quality demand as the output of the output layer according to the service quality evaluation index data in the input sample data set, and builds a user demand prediction model;

[0009] S300, calculating a first weight value of the user's service quality requirement by using a hierarchy analysis method according to the user's service quality requirement;

[0010] S400, calculating a second weight value of the user's service quality requirement by an entropy method according to the service quality evaluation index;

[0011] S500, calculating a mixed weight value of the service quality evaluation by using an arithmetic mean method according to a first weight value and a second weight value of the service quality for the user;

[0012] S600, according to the mixed weight value, a TOPSIS multi-attribute decision method is used to match the user with a service that meets the user's needs, and a service discovery result is generated.

[0013] Further, in S100, several service quality evaluation indicators related to user needs are screened, and the several service quality evaluation indicators include availability, response time, delay, reliability and success rate. The input sample data set X'=[x 1 ,x 2 ,x 3 ,x 4 ,x 5 ] is represented by, where x 1 to x 5 They represent availability, response time, delay, reliability and success rate in service quality evaluation indicators respectively.

[0014] Further, in S200, the building of the user demand prediction model includes the following steps:

[0015] S201, normalize the historical service request data, and use the input sample data set to set the time step to T to construct the input layer data matrix X of the user demand prediction model:

[0016]

[0017] In the formula, T represents the time step, x 1 to x 5 represents availability, response time, delay, reliability and success rate in service quality evaluation indicators respectively; x μ,1 represents the availability at the μth time step, x μ,2 represents the response time of the μth time step, x μ,3 represents the delay of the μth time step, x μ,4 represents the reliability of the μth time step, x μ,5 represents the success rate of the μth time step

[0018] S202, constructing a user demand prediction model including an input layer, a Bi-LSTM layer, an attention layer, and an output layer;

[0019] S203, training the user demand prediction model, dividing the input sample data set into a training set and a test set, the training set is used to train the model, and the test set is used to evaluate the effectiveness of the trained user demand prediction model;

[0020] S204, testing the user demand prediction model, and using the test set data to verify the accuracy of the user demand prediction model.

[0021] Further, in S202, the Bi-LSTM layer includes a bidirectional feedback connection composed of a plurality of LSTM templates, so that the Bi-LSTM network can extract user demand information from both forward and reverse directions. The calculation formula of the feedback process of each LSTM module is expressed as follows:

[0022]

[0023] In the formula, and The forward memory vector and reverse memory vector of the ε-th group of LSTM modules; and are the forward and reverse transformation matrices of the LSTM module, respectively. t is the input of the current time step, y t,ε represents the hidden layer vector; b is the compensation value parameter.

[0024] Furthermore, the calculation formula of the attention layer is expressed as follows:

[0025]

[0026] In the formula, and is the weight matrix updated for feature state learning, tanh represents the hyperbolic tangent activation function, H T It is the transpose of H, with a shape of d×T, and the SoftMax function represents the normalized exponential function;

[0027] Y=[o 1 ,o 2 ,o 3 ,...o 5 ]H T

[0028] In the formula, the attention matrix after output is used [o 1 ,o 2 ,o 3 ,...o 5 ] and the hidden layer vector H output by the LSTM module T Multiply them together, and Y is the output vector after being optimized by the attention mechanism of the attention layer.

[0029] Further, in S202, the output vector Y is input into the fully connected layer for feature fusion to generate a fusion result, and the fusion result is normalized to the range of [0,1] using the sigmoid activation function to generate the user demand prediction value Z at time t+1. t+1 , and generates expected services based on the output vector and user demand prediction values.

[0030] Furthermore, S300 includes:

[0031] S301, using the relative advantage value α ij It represents the user's evaluation of service quality. The calculation formula of relative advantage value is as follows:

[0032]

[0033] In the formula, Q i It represents the user's evaluation index of service quality at the current moment, Q j It indicates the user's demand evaluation index for service quality at the previous moment. The values ​​0, 1, and 2 respectively represent the user's current evaluation index Q for service quality demand. i Second to, equal to, or better than the previous evaluation index Q of service quality requirements j ;

[0034] S302, forming a judgment matrix of the user's demand for service quality based on the relative advantage value:

[0035]

[0036] In the formula, α kk Denotes the judgment matrix (A ij ) k×k The element at row k and column k in ;

[0037] S303, normalize the judgment matrix and convert the judgment matrix into a standard cell matrix x ij , the calculation formula is as follows:

[0038]

[0039] S304, the standard evaluation matrix (x ij ) k×k Perform normalization processing to generate the first weight value w of the user's service quality requirement sub , the formula is as follows:

[0040]

[0041] In the formula, x ij represents the standard cell matrix, the standard judgment matrix (x ij ) k×k is a k×k matrix, represents the sum of the elements in the i-th row, and Represents the sum of all elements in the entire matrix.

[0042] Furthermore, S400 includes:

[0043] S401, service quality evaluation index Q ij Normalization is performed, and the specific processing formula is as follows:

[0044]

[0045] In the formula, Q ij represents the service quality evaluation index, n represents the number of candidate services;

[0046] S402, calculate the information entropy using the following formula:

[0047]

[0048] In the formula, if p ij =0, then n represents the number of candidate services; K is the number of dimensions of the service quality evaluation index;

[0049] S403, calculating a second weight value of the user's service quality requirement according to the information entropy, and the calculation formula is as follows:

[0050]

[0051] In the formula, K is the dimension number of service quality evaluation index, E j Represents information entropy.

[0052] Further, in S500, the calculation formula of the hybrid weight value is as follows:

[0053] w=αw sub +(1-α)w obj , 0≤α≤1

[0054] In the formula, α is the preference coefficient of the mixed weight value, w sub and w obj The first weight value and the second weight value respectively represent the user's demand for service quality.

[0055] Furthermore, S600 includes:

[0056] S601, obtain several candidate services and construct a service quality evaluation matrix:

[0057]

[0058] Where N represents the number of candidate services, and k represents the k-dimensional service quality evaluation index of each candidate service;

[0059] S602, normalize the service quality evaluation matrix to generate a unit service quality evaluation matrix F. The calculation formula of the unit service quality evaluation matrix is ​​as follows:

[0060]

[0061] In the formula, F ij represents the service quality evaluation matrix, N represents the number of candidate services;

[0062] S603: construct a weighted decision matrix V according to the mixed weight value ij , the weighted decision matrix V ij The calculation formula is as follows:

[0063] V ij =F ij '×w

[0064] In the formula, F ij ' represents the unit service quality evaluation matrix, w represents the mixed weight value;

[0065] S604, based on the TOPSIS multi-attribute decision-making method, calculate the positive ideal point and the negative ideal point, and the calculation formula is as follows:

[0066]

[0067] Where V + Represents the positive ideal point of the indicator, which represents the maximum value of the service quality indicator among all candidate services. - Represents the negative ideal point of the indicator, which represents the minimum value of the service quality indicator among all candidate services. nj Denotes the weighted decision matrix V ij Elements in

[0068] S605, calculating the distances from each candidate service to the positive ideal point and the negative ideal point, the calculation formula is as follows:

[0069]

[0070] In the formula, represents the distance from the i-th candidate service to the positive ideal point, represents the distance from the i-th candidate service to the negative ideal point, V ij represents the weighted decision matrix;

[0071] S606, calculating the closeness between each candidate service and the expected service, the calculation formula is as follows:

[0072]

[0073] In the formula, CD i represents the closeness of the i-th candidate service, represents the distance from the i-th candidate service to the positive ideal point, represents the distance from the i-th candidate service to the negative ideal point, and n represents the number of candidate services;

[0074] S607, sorting the fit degree corresponding to each candidate service in descending order according to the fit degree corresponding to each candidate service, and generating a fit degree sorting result based on the service quality evaluation index driven by user demand;

[0075] S608: According to the closeness ranking result, select the candidate service ranked first in the closeness ranking result as the service discovery result.

[0076] Beneficial effects of the present invention:

[0077] The present invention proposes a service discovery method based on user demand drive. First, a user demand prediction model is constructed using a Bi-LSTM network to mine the user's real-time demand information for service quality; secondly, in order to comprehensively consider the weight relationship between the user's demand for service quality and the service quality evaluation index, the present invention uses the hierarchical analysis method and the entropy method to calculate the user's first weight value and second weight value for service quality. By comprehensively evaluating the mixed weight factors including the first weight value and the second weight value, and generating a service discovery result, the user is matched with services that meet his needs in a dynamically changing Internet of Things environment, thereby improving the accuracy of service matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A flow chart showing the overall structure of the present invention;

[0079] Figure 2 It is a structural diagram of the user demand prediction model of the present invention;

[0080] Figure 3 A comparison chart of the service discovery accuracy results of the Bi-LSTM user demand prediction model and the LSTM network prediction model of the present invention;

[0081] Figure 4 This is a diagram of the NDCG scores of the SD-QoS service discovery method, the URSD service discovery method, and the URDQ service discovery method of the present invention. DETAILED DESCRIPTION

[0082] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0083] In the description of the present invention, unless otherwise specified, "plurality" means two or more than two; the orientations or positional relationships indicated by the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0084] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0085] like Figure 1 As shown, a method for discovering IoT services based on user needs includes the following steps:

[0086] S100, obtaining historical service request data of the user, preprocessing the historical service request data, screening several service quality evaluation indicators related to user needs, and establishing an input sample data set;

[0087] As a preferred solution, in S100, several service quality evaluation indicators related to user needs are screened, and the several service quality evaluation indicators include availability, response time, delay, reliability and success rate. The input sample data set X'=[x 1 ,x 2 ,x 3 ,x 4 ,x 5 ] is represented by, where x 1 to x 5 They represent availability, response time, delay, reliability and success rate in service quality evaluation indicators. Considering that users usually choose services based on their long-term service request habits and short-term interest preferences, the demand prediction model proposed in this scheme is trained using users' historical service request usage.

[0088] S200, based on the Bi-LSTM network, takes the service quality evaluation index as the input of the input layer and the user's service quality demand as the output of the output layer according to the service quality evaluation index data in the input sample data set, and builds a user demand prediction model;

[0089] The user demand prediction model based on the Bi-LSTM network uses long-term and short-term neural network structures to capture the user's long-term, short-term and reverse time series service demand information, thereby achieving real-time acquisition of user service demand information. In this way, the present invention can more accurately capture the user's real-time demand for service quality in a constantly changing environment by introducing time series information into service discovery;

[0090] As a preferred solution, in S200, constructing the user demand prediction model includes the following steps:

[0091] S201, normalize the historical service request data, and use the input sample data set to set the time step to T, to construct the input layer data matrix X of the user demand prediction model. The formula of X is as follows:

[0092]

[0093] In the formula, T represents the time step, x 1 to x 5 represents availability, response time, delay, reliability and success rate in service quality evaluation indicators respectively; x μ,1 represents the availability at the μth time step, x μ,2 represents the response time of the μth time step, x μ,3 represents the delay of the μth time step, x μ,4 represents the reliability of the μth time step, x μ,5 represents the success rate of the μth time step

[0094] S202, constructing a user demand prediction model including an input layer, a Bi-LSTM layer, an attention layer, and an output layer;

[0095] The user demand prediction model using the Bi-LSTM network (bidirectional long short-term memory network) includes a four-layer network model, whose structure is as follows Figure 2 As shown, the user demand prediction model includes: input layer, Bi-LSTM layer (bidirectional long short-term memory layer), attention layer and output layer;

[0096] From the perspective of user needs, we select five aspects of service availability, response time, delay, reliability and success rate as evaluation indicators of service quality. 1 : represents the probability that the service is currently available; x 2 : It indicates the time consumed by the user from sending a service request to receiving a service response; x 3 : Indicates the time delay for service data to reach the destination port from the service source; x 4 : Indicates the ability of a service to perform service functions within a specified time interval class; x 5 : Indicates the probability of a user's service request being successfully matched;

[0097] The data items of the input layer are composed of the input sample data set X': x 1 ,x 2 ,x 3 ,x 4 ,x 5The five dimensions of service quality evaluation indicators are expressed. The five service quality dimensions in the present invention include different numerical ranges. In order to improve the generalization and convergence ability of the user demand prediction model, the service quality data items related to these dimensions need to be regularized and normalized before being input into the Bi-LSTM layer. In order to extract feature information related to user demand from the forward and reverse time series, the present invention uses the Bi-LSTM network layer after the input layer to learn the demand feature information.

[0098] In S202, the Bi-LSTM layer includes a bidirectional feedback connection consisting of five LSTM templates (long short-term memory network templates), so that the Bi-LSTM network can extract user demand information from both forward and reverse directions. The calculation formula of the feedback process of each LSTM module is expressed as follows:

[0099]

[0100] In the formula, and The forward memory vector and reverse memory vector of the ε-th group of LSTM modules; and are the forward and reverse transformation matrices of the LSTM module, respectively. t is the input of the current time step, y t,ε represents the hidden layer vector; b is the compensation value parameter.

[0101] In this embodiment, in addition to the Bi-LSTM network, this solution also adds an Attention mechanism, which mainly dynamically assigns weight values ​​to the output vectors of the hidden layer and filters the data feature items dynamically generated during time changes. The purpose of this method is to minimize the impact of irrelevant data on the prediction results and improve the prediction accuracy.

[0102] The calculation formula of the attention layer is expressed as follows:

[0103]

[0104] In the formula, and is the weight matrix updated for feature state learning, tanh represents the hyperbolic tangent activation function, H T is the transpose of H, with a shape of d×T, The result is a vector with a shape of 1×T. The SoftMax function represents the normalized exponential function. After being processed by the SoftMax function (normalized exponential function), the output attention matrix O=[o 1 ,o 2 ,o 3 ,...o 5];

[0105] Y=[o 1 ,o 2 ,o 3 ,...o5]H T

[0106] In the formula, the output attention matrix O = [o 1 ,o 2 ,o 3 ,...o 5 ] and the hidden layer vector H output by the LSTM module T Multiply, Y is the output vector after the attention mechanism of the attention layer is optimized, and the output features generated by the attention layer are merged;

[0107] In S202, the output vector Y is input into the fully connected layer for feature fusion to generate a fusion result, and the fusion result is normalized to the range of [0,1] using the sigmoid activation function (S-shaped growth curve function) to generate the user demand prediction value Z at time t+1. t+1 , and generates expected services based on the output vector and user demand prediction values.

[0108] Use the user demand prediction model to predict the user demand prediction value Z at time t+1 t+1 . Where Z t+1 It is a vector containing k QoS (quality of service) attributes, which represents the user's expected value of each QoS (quality of service) attribute at time t+1.

[0109] Z t+1 =σ(W 2 Y+b 2 )

[0110] Where W 2 Represents the weight matrix of the fully connected layer, with a shape of,b 2 represents the bias term of the fully connected layer, Y represents the output vector of the attention layer, and σ represents the sigmoid activation function.

[0111] In summary, the user demand prediction model of this solution first constructs a Bi-LSTM model consisting of two layers of LSTM, in which the LSTM models are cascaded in forward and reverse directions to form a Bi-LSTM model. Secondly, an Attention layer is added to the output part of the Bi-LSTM model to better focus on the important information in the user demand data. Finally, a fully connected layer is used to transmit the data output from the attention layer, which helps to classify user needs and predict the required services, so that the structure of the user demand prediction model can effectively capture the dynamic changes in the time series and improve the prediction accuracy and generalization ability of the model.

[0112] S203, train the user demand prediction model, divide the input sample data set into a training set and a test set, the training set is used to train the model, and the test set is used to evaluate the effectiveness of the trained user demand prediction model; in order to train the user demand prediction model, this solution uses historical user request data containing service quality information as a data set, and divides this data set into a training set and a test set in a ratio of 7:3. The training set is used to train the user demand prediction model, and the test set is used to evaluate the effectiveness of the trained user demand prediction model. Divide the historical user request data into a training set and a test set in a ratio of 7:3. This division method ensures that there is enough data for training (accounting for 70%), while leaving enough data for testing (accounting for 30%), so as to evaluate the performance of the model on unseen data.

[0113] S204, testing the user demand prediction model, and using the test set data to verify the accuracy of the user demand prediction model.

[0114] S300, calculating a first weight value of the user's service quality requirement by using a hierarchy analysis method according to the user's service quality requirement;

[0115] The AHP method includes calculating relative advantage values;

[0116] S300 includes:

[0117] S301, compare the user's evaluation index of service quality at the current moment with the user's demand evaluation index of service quality at the previous moment, and generate a relative advantage value α ij , using the relative advantage value α ij It represents the user's evaluation of service quality. The calculation formula of relative advantage value is as follows:

[0118]

[0119] In the formula, Q i It represents the user's evaluation index of service quality at the current moment, Q j It indicates the user's demand evaluation index for service quality at the previous moment. The values ​​0, 1, and 2 respectively represent the user's current evaluation index Q for service quality demand. i Second to, equal to, or better than the previous evaluation index Q of service quality requirements j ;

[0120] S302, forming a judgment matrix of the user's demand for service quality based on the relative advantage value:

[0121]

[0122] In the formula, α kkDenotes the judgment matrix (A ij ) k×k The element in the kth row and kth column of represents the relative advantage value when the user's evaluation index of the service quality at the current moment is compared with the user's demand evaluation index of the service quality at the previous moment;

[0123] By comparing the current and previous evaluations, the user's judgment matrix of service quality requirements is obtained; in order to maintain a fair evaluation of each indicator, the judgment matrix is ​​normalized. By implementing this normalization, all evaluation indices are limited to the range of [0,1].

[0124] S303, normalize the judgment matrix and convert the judgment matrix into a standard cell matrix x ij , the calculation formula is as follows:

[0125]

[0126] S304, according to the standard cell matrix x ij Generate standard judgment matrix (x ij ) k×k , and the standard judgment matrix (x ij ) k×k Perform normalization processing to generate the first weight value w of the user's service quality requirement sub , the formula is as follows:

[0127]

[0128] In the formula, x ij represents the standard cell matrix, the standard judgment matrix (x ij ) k×k is a k×k matrix where each element x ij is the judgment matrix (A ij ) k×k Obtained through normalization, this process ensures that all evaluation indicators are limited to the range of [0,1], making different indicators comparable.

[0129] The first weight value w sub is to transform the standard judgment matrix (x ij ) k×k It is obtained by summing each column of , and then dividing the sum of each element by the sum of all the sums of the elements;

[0130] x ij represents the elements in the standard cell matrix, is the sum of the elements in the ith row, and is the sum of all elements of the entire matrix.

[0131] The w obtained through the above process sub is a vector, each element of which represents the weight of the corresponding service quality requirement. These weights reflect the importance that users attach to different service quality indicators. The larger the weight, the more importance users attach to the indicator.

[0132] Through the above process, we are able to convert users' service quality requirements into specific, quantified weight values, which can be used for further data analysis or decision support, such as predicting user demand models. This method not only enhances the objectivity and accuracy of the analysis, but also helps to better understand and meet user needs.

[0133] S400, calculating a second weight value of the user's service quality requirement by an entropy method according to the service quality evaluation index;

[0134] Entropy method: It is an objective analysis technique for determining weights. It uses indicators to measure the degree of differentiation of the evaluation object. When the information entropy of an indicator is low, it indicates that the degree of differentiation of the evaluation object is high because it has more information. In this solution, the information entropy method is used to objectively calculate the second weight value of service quality;

[0135] S400 includes:

[0136] S401, service quality evaluation index Q ij Normalization is performed, and the specific processing formula is as follows:

[0137]

[0138] In the formula, Q ij represents the service quality evaluation index, n represents the number of candidate services, Q ij It indicates the service quality evaluation index of the i-th candidate service in the j-th service quality evaluation index;

[0139] S402, calculate the information entropy using the following formula:

[0140]

[0141] In the formula, if p ij =0, then n represents the number of candidate services, and K is the number of dimensions of the service quality evaluation index;

[0142] S403, calculating a second weight value of the user's service quality requirement according to the information entropy, and the calculation formula is as follows:

[0143]

[0144] Where K is the dimension number of service quality evaluation indicators, that is, the total number of all service quality evaluation indicators considered, Ej Represents information entropy.

[0145] Through the above steps, the second weight value of the user's service quality demand is calculated. The specific steps include normalizing the service quality evaluation index, calculating the information entropy, and calculating the second weight value according to the information entropy. This process objectively reflects the importance of each service quality evaluation index through the entropy method, providing a scientific basis for subsequent service quality management and optimization.

[0146] S500, according to the first weight value and the second weight value of the user for the service quality, weight and average the first weight value and the second weight value by using an arithmetic mean method, and calculate a mixed weight value for the service quality evaluation;

[0147] In S500, the calculation formula of the hybrid weight value is as follows:

[0148] w=αw sub +(1-α)w obj , 0≤α≤1

[0149] In the formula, α is the preference coefficient of the mixed weight value, w sub and w obj They respectively represent the first weight value and the second weight value of the user's service quality demand; specifically, wherein α is the preference coefficient of the mixed weight, which reflects the decision maker's preference for the first weight value of the service quality intensity. When the user selects a service, the coefficient α needs to be adjusted to select a suitable service for the user; α represents the importance attached to the first weight value, and the value range is 0≤α≤1. When α=1, the mixed weight value w is completely dependent on the first weight value; when α=0, the mixed weight value w is completely dependent on the second weight value; when 0<α<1, the mixed weight value w comprehensively considers the first weight value and the second weight value.

[0150] Through the above steps, the mixed weight value of the user's service quality requirements can be systematically calculated. The specific steps include obtaining the first weight value and the second weight value, setting the preference coefficient, and calculating the mixed weight value using the arithmetic mean method. This process comprehensively considers the user's preference for the first weight value and the second weight value of the service quality intensity, providing a more comprehensive and scientific basis for service quality management and optimization.

[0151] S600, according to the mixed weight value, the TOPSIS multi-attribute decision-making method (approximate ideal solution ranking method) is used to match the user with services that meet the user's needs, and a service discovery result is generated.

[0152] After comprehensively calculating the mixed weight values ​​of users' evaluation of service quality, this solution uses the TOPSIS multi-attribute decision method to sort and screen services. The TOPSIS decision method is a multi-criteria evaluation technique that considers the similarity between candidate services and the best service (expected service). It determines the quality ranking of candidate services by quantifying the Euclidean distance between positive ideal points and negative ideal points. The distance between a candidate service and the best service indicates its quality level. Conversely, the farther a candidate service is from the best service, the lower its quality ranking.

[0153] S600 includes:

[0154] S601, obtain several candidate services and construct a service quality evaluation matrix:

[0155]

[0156] Where N represents the number of candidate services, and k represents the k-dimensional service quality evaluation index of each candidate service;

[0157] S602, normalize the service quality evaluation matrix to generate a unit service quality evaluation matrix, the calculation formula of the unit service quality evaluation matrix is ​​as follows:

[0158]

[0159] In the formula, F ij represents the service quality evaluation matrix, N represents the number of candidate services;

[0160] S603: construct a weighted decision matrix V according to the mixed weight value ij , the weighted decision matrix V ij The calculation formula is as follows:

[0161] V ij =F ij '×w

[0162] In the formula, F ij ' represents the unit service quality evaluation matrix, w represents the mixed weight value;

[0163] S604, based on the TOPSIS multi-attribute decision-making method, calculate the positive ideal point and the negative ideal point, and the calculation formula is as follows:

[0164]

[0165] Where V + Represents the positive ideal point of the indicator, which represents the maximum value of the service quality indicator among all candidate services. -Represents the negative ideal point of the indicator, which represents the minimum value of the service quality indicator among all candidate services. nj represents the weighted decision matrix V used to determine positive ideal points and negative ideal points ij The elements in .

[0166] S605, calculating the distances from each candidate service to the positive ideal point and the negative ideal point, the calculation formula is as follows:

[0167]

[0168] In the formula, represents the distance from the i-th candidate service to the positive ideal point, represents the distance from the i-th candidate service to the negative ideal point, V ij represents the weighted decision matrix;

[0169] S606, calculating the closeness between each candidate service and the expected service, the calculation formula is as follows:

[0170]

[0171] In the formula, CD i represents the closeness of the i-th candidate service, represents the distance from the i-th candidate service to the positive ideal point, represents the distance from the i-th candidate service to the negative ideal point, and n represents the number of candidate services;

[0172] S607, sorting the fit degree corresponding to each candidate service in descending order according to the fit degree corresponding to each candidate service, and generating a closeness ranking result of the service quality evaluation index driven by user demand; closeness CD i The larger the value, the more the candidate service meets the user's needs compared to other services, and the stronger its comprehensive matching ability is;

[0173] S608: Filter the candidate service ranked first in the proximity ranking result as the service discovery result according to the proximity ranking result. Specifically, the selected candidate service ranked first shows the highest degree of proximity to the user's needs, thereby meeting the required service quality evaluation standard.

[0174] The best service ideal points include positive ideal points and negative ideal points. In the service discovery process, the distances from each candidate service to the positive ideal points and negative ideal points, as well as the closeness to the expected service, are calculated to select the service that best meets user needs as the service discovery result.

[0175] Specifically, the purpose of the invention is to accurately obtain the user's demand information on service quality in real time, analyze the first weight impact of the user's service quality demand and the second weight value of the service quality evaluation index, and match the user with the service information that best meets his needs in a limited service environment. In view of the difficulty in accurately obtaining user service demand information in real time, the present invention proposes a user demand prediction model based on Bi-LSTM, which predicts and obtains the user's service demand in real time through the user's long-term service request habits and short-term interest preferences. In order to comprehensively measure the weight relationship between user service demand and service quality, the hierarchical analysis method and the entropy method are used to calculate the first weight value and the second weight value of the user's service quality respectively, and the mixed weight impact is comprehensively evaluated. In a dynamic Internet of Things environment, services that meet the user's needs are discovered for the user to improve the accuracy of service discovery.

[0176] Evaluation indicators of this program:

[0177] In order to verify the effectiveness of the service discovery method designed based on user needs, the present invention uses two evaluation indicators to evaluate the performance of the user demand prediction model. These indicators include the root mean square error (RMSE) and the mean absolute percentage error (MAPE), which can be calculated using the following formula:

[0178]

[0179] Secondly, we select accuracy and normalized discounted cumulative gain (NDCG) as evaluation indicators of service discovery results. The formula is as follows:

[0180]

[0181] In the formula, match(S i ,D j ) represents the i-th service discovery result S i and the jth real service demand D j The closeness of the match. And count(match(S i ,D j ),...,match(S i ,D k )) means S i The cumulative value of the matching between the test set and all real service requirements, where N represents the number of users in the test set, and k represents the number of k real service requirements. When each user has only one real service requirement information, N = k.

[0182] NDCG is a performance metric commonly used to evaluate the quality of service recommendation systems. It measures the ranking accuracy of a set of recommended services. However, the goal of service discovery is to match users with the most appropriate service among a variety of services with similar functions. NDCG can effectively measure user satisfaction with service recommendations and enable decision makers to adjust users' service quality requirements based on the NDCG value. This enhances the identification of suitable services for users in environments with limited service options, thereby improving user satisfaction. In addition, NDCG provides a quantitative measure for the accuracy of service discovery ranking, which facilitates comparison and evaluation of different results. The NDCG value is between 0 and 1. The higher the value, the higher the similarity with the service request and the higher the ranking of the query result. The calculation formula of NDCG is as follows:

[0183]

[0184]

[0185] In the formula, reli represents the relevance of the i-th service in the search results to the service required by the user; |reli| represents the order of these i services from the highest to the lowest relevance; Q s (S i ) represents the ranking result scores of the top i; and IDCG i It represents the maximum ideal score of the top i ranking results, that is, the DCG value under the optimal ranking.

[0186] Experimental data:

[0187] The experiments of the present invention use the SIOT-Lysis IoT dataset to build user demand models. Specifically, we select five QoS attribute indicators, including latency, response time, availability, reliability, and success rate, as shown in Table 1, to train these models based on the historical usage of IoT services by users. Secondly, the QWS dataset, which includes various evaluation indices for each candidate service, is used to conduct a comparative experiment on QoS-based service discovery. This dataset is publicly available and can effectively evaluate the proposed method.

[0188] Table 1 Data format of user's service history usage

[0189]

[0190] In the above table, QoS_Service is composed of the delay time Q l (S i ), response time Q t (S i ), availability Q a (S i), reliability Q r (S i ), success rate Q s (S i ) is composed of five evaluation indicators.

[0191] Experimental results:

[0192] User demand prediction model comparison experiment:

[0193] In the comparative experiment of the user demand prediction model, the present invention evaluates the effectiveness of the proposed Bi-LSTM user demand prediction model by comparing it with the traditional LSTM network prediction model. In order to verify the performance of the model, we extracted data from the dataset and trained and tested the model at time step intervals of 1 minute, 5 minutes, and 10 minutes. The evaluation indicators used in the experiment are the root mean square error (RMSE) and the mean absolute percentage error (MAPE). The comparison results are shown in the following table.

[0194] Table 2 Comparison of user demand prediction results

[0195]

[0196]

[0197] According to the comparison results of user demand prediction in the above table, it can be seen that the root mean square error and mean absolute percentage error achieved by the user demand prediction model based on the Bi-LSTM network proposed in the present invention are the smallest, which shows that when considering a longer time interval, the prediction results proposed by the present invention are the most accurate. In contrast, the prediction model based only on the LSTM network shows relatively poor performance, as shown by its MAPE and RMSE values. There are two reasons to explain this result, which are summarized as follows:

[0198] On the one hand, the Bi-LSTM network is more effective in predicting the user's service quality needs due to the mutual influence between user needs and objective service quality. The structure of the positive and negative bidirectional memory modules integrated into the Bi-LSTM network enables the model to learn the temporal changes of user demand characteristics, thereby obtaining more accurate prediction results. On the other hand, the proposed Bi-LSTM-based prediction model utilizes the Attention mechanism to dynamically filter out irrelevant and destructive data by responding to small changes in user real-time needs. This enables the model to produce more accurate prediction results. Therefore, the Bi-LSTM network-based model not only effectively filters the characteristic information of user needs using the Attention mechanism, but also generates enhanced vector features through reverse time series learning, thereby improving the prediction performance.

[0199] Service discovery comparison experiment:

[0200] In order to evaluate the effectiveness of the URSSD method proposed in the present invention in service discovery, the results obtained using this method are compared and analyzed with the SD-QoS service discovery method and the URDQ method, which also use the QoS service discovery method.

[0201] To ensure the accuracy of the service discovery process for different numbers of services, we conducted experiments with an increment of 100 services, with a total of 600 candidate service data. The evaluation metric in Formula 4-26 was used to compare and validate the accuracy results of service discovery. By doing so, we aim to demonstrate that the proposed URSSD method produces higher accuracy and NDCG values ​​compared to existing methods, thereby validating its role in service discovery.

[0202] according to Figure 3 From the accuracy comparison results shown, it is obvious that the proposed URSD method outperforms the other two service discovery methods in terms of accuracy as the number of services increases. Although the URDQ method shows good accuracy performance in the early stages, its accuracy level continues to decline as the number of services increases. This is due to the limited effectiveness of the interval number model adopted by the URDQ method, which cannot capture the changes in users' real-time service requirements over a longer time span, resulting in a decrease in accuracy. In contrast, the URSSD method proposed in the present invention utilizes a Bi-LSTM network-based method to perceive users' real-time requirements for service quality and determine the relationship between subjective and objective service quality to facilitate service discovery. Therefore, the proposed method achieves higher accuracy in the service discovery task, even in the presence of different numbers of services and time variations in user requirements.

[0203] At the same time, the present invention uses the Normalized Discounted Cumulative Gain (NDCG) evaluation index to conduct a comparative experiment on 600 service volume samples, and each service volume is tested incrementally. The experimental results are shown in Figure 4 As shown, Figure 4The comparison chart in shows the NDCG scoring results of the three service discovery methods, highlighting that as the number of service samples increases, the URSSD method proposed in this invention outperforms the other two methods in terms of NDCG values. The SD-QoS method mainly relies on the user background method to pre-process the QoS value, and fails to take into account the objective impact of service quality, resulting in the worst performance of the service discovery evaluation results. Similarly, the QSUD method uses an interval number model to measure the user's QoS requirements for service quality, but as the number of services increases and time passes, the resulting NDCG value is worse than that of the URSSD method proposed in this chapter. In contrast, the URSSD service discovery method proposed in this invention combines the user's subjective needs with the objective weighted influencing factors of service quality for comprehensive analysis, which is conducive to the continuous discovery of services in a time-varying service environment to meet user needs. Therefore, this method effectively improves user satisfaction with service discovery in a limited service environment.

[0204] Compared with the existing Internet of Things service discovery technology, the Internet of Things service discovery method proposed in the present invention is effectively improved and optimized mainly from two aspects.

[0205] First, it is difficult to accurately obtain the user's real-time demand information for service quality in real time under time series changes. The user demand prediction method based on Bi-LSTM in the present invention predicts the user's demand information for service quality in real time according to the user's long-term service usage habits and short-term interest preferences under time series conditions. Compared with the traditional LSTM network prediction method, the Bi-LSTM user demand prediction method proposed in the present invention has a good improvement in different time steps. When the time step is 1min, the root mean square error (MAPE) of the Bi-LSTM prediction model is 0.061, and the mean absolute percentage error (RMSE) is 0.273. Compared with the LSTM network prediction model, MAPE is improved by 0.091 and RMSE is improved by 0.278.

[0206] Secondly, the problem of low user service matching rate in traditional service discovery methods. The present invention comprehensively considers the subjective and objective weight influence of users on service quality QoS, and through TOPSIS multi-attribute decision analysis, discovers service information that meets the needs of users in a limited service environment. Compared with the service discovery method based on QoS, the present invention maintains a service discovery accuracy rate of more than 50% under matching with different service numbers, and the user service experience has good performance.

[0207] The present invention has been described in detail above. The description of the specific embodiments is only used to help understand the method of the present invention and its core concept. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A method for discovering Internet of Things services based on user needs, characterized in that: The following steps are involved: S100, obtaining historical service request data of the user, preprocessing the historical service request data, screening several service quality evaluation indicators related to user needs, and establishing an input sample data set; S200, based on the Bi-LSTM network, takes the service quality evaluation index as the input of the input layer and the user's service quality demand as the output of the output layer according to the service quality evaluation index data in the input sample data set, and builds a user demand prediction model; S300, calculating a first weight value of the user's service quality requirement by using a hierarchy analysis method according to the user's service quality requirement; S400, calculating a second weight value of the user's service quality requirement by an entropy method according to the service quality evaluation index; S500, calculating a mixed weight value of the service quality evaluation by using an arithmetic mean method according to a first weight value and a second weight value of the service quality for the user; S600, according to the mixed weight value, a TOPSIS multi-attribute decision method is used to match the user with a service that meets the user's needs, and a service discovery result is generated.

2. The method for discovering Internet of Things services based on user needs according to claim 1, characterized in that: In S100, several service quality evaluation indicators related to user needs are screened, and the several service quality evaluation indicators include availability, response time, delay, reliability and success rate, and are represented by an input sample data set X′=[x1,x2,x3,x4,x5], wherein x1 to x5 represent the availability, response time, delay, reliability and success rate of the service quality evaluation indicators respectively.

3. The method for discovering Internet of Things services based on user needs according to claim 2, characterized in that: In S200, the construction of the user demand prediction model includes the following steps: S201, normalize the historical service request data, and use the input sample data set to set the time step to T to construct the input layer data matrix X of the user demand prediction model: In the formula, T represents the time step, x1 to x5 represent the availability, response time, delay, reliability and success rate of the service quality evaluation indicators respectively; x μ,1 represents the availability at the μth time step, x μ,2 represents the response time of the μth time step, x μ,3 represents the delay of the μth time step, x μ,4 represents the reliability of the μth time step, x μ,5 represents the success rate of the μth time step S202, constructing a user demand prediction model including an input layer, a Bi-LSTM layer, an attention layer, and an output layer; S203, training the user demand prediction model, dividing the input sample data set into a training set and a test set, the training set is used to train the model, and the test set is used to evaluate the effectiveness of the trained user demand prediction model; S204, testing the user demand prediction model, and using the test set data to verify the accuracy of the user demand prediction model.

4. The method for discovering Internet of Things services based on user needs according to claim 3, characterized in that: In S202, the Bi-LSTM layer includes a bidirectional feedback connection composed of several LSTM templates, so that the Bi-LSTM network can extract user demand information from both forward and reverse directions. The calculation formula of the feedback process of each LSTM module is expressed as follows: In the formula, and The forward memory vector and reverse memory vector of the ε-th group of LSTM modules; and are the forward and reverse transformation matrices of the LSTM module, respectively. t is the input of the current time step, y t,ε represents the hidden layer vector; b is the compensation value parameter.

5. The method for discovering Internet of Things services based on user needs according to claim 4, characterized in that: The calculation formula of the attention layer is expressed as follows: In the formula, and is the weight matrix updated for feature state learning, tanh represents the hyperbolic tangent activation function, H T It is the transpose of H, with a shape of d×T, and the SoftMax function represents the normalized exponential function; Y=[o1,o2,o3,..o5]H T In the formula, the output attention matrix [o1,o2,o3,...o5] and the hidden layer vector H output by the LSTM module are used. T Multiply them together, and Y is the output vector after being optimized by the attention mechanism of the attention layer.

6. The method for discovering Internet of Things services based on user needs according to claim 5, characterized in that: In S202, the output vector Y is input into the fully connected layer for feature fusion to generate a fusion result, and the fusion result is normalized to the range of [0,1] using the sigmoid activation function to generate the user demand prediction value Z at time t+1. t+1 , and generates expected services based on the output vector and user demand prediction values.

7. The method for discovering Internet of Things services based on user needs according to claim 6, characterized in that: S300 includes: S301, using the relative advantage value α ij It represents the user's evaluation of service quality. The calculation formula of relative advantage value is as follows: In the formula, Q i It represents the user's evaluation index of service quality at the current moment, Q j It indicates the user's demand evaluation index for service quality at the previous moment. The values ​​0, 1, and 2 respectively represent the user's current evaluation index Q for service quality demand. i Second to, equal to, or better than the previous evaluation index Q of service quality requirements j ; S302, forming a judgment matrix of the user's demand for service quality based on the relative advantage value: In the formula, α kk Denotes the judgment matrix (A ij ) k×k The element at row k and column k in ; S303, normalize the judgment matrix and convert the judgment matrix into a standard cell matrix X ij , the calculation formula is as follows: S304, the standard evaluation matrix (X ij ) k×k Perform normalization processing to generate the first weight value W of the user's service quality requirement sub , the formula is as follows: In the formula, x ij represents the standard cell matrix, the standard judgment matrix (x ij ) k×k is a k×k matrix, represents the sum of the elements in the i-th row, and Represents the sum of all elements in the entire matrix.

8. The method for discovering Internet of Things services based on user needs according to claim 7, characterized in that: S400 includes: S401, service quality evaluation index Q ij Normalization is performed, and the specific processing formula is as follows: In the formula, Q ij represents the service quality evaluation index, n represents the number of candidate services; S402, calculate the information entropy using the following formula: In the formula, if p ij =0, then n represents the number of candidate services; K is the number of dimensions of the service quality evaluation index; S403, calculating a second weight value of the user's service quality requirement according to the information entropy, and the calculation formula is as follows: In the formula, K is the dimension number of service quality evaluation index, E j Represents information entropy.

9. The method for discovering Internet of Things services based on user needs according to claim 8, characterized in that: In S500, the calculation formula of the hybrid weight value is as follows: w=αw sub +(1-a)w obj ,0≤α≤1 In the formula, α is the preference coefficient of the mixed weight value, w sub and w obj The first weight value and the second weight value respectively represent the user's demand for service quality.

10. The method for discovering Internet of Things services based on user needs according to claim 9, characterized in that: S600 includes: S601, obtain several candidate services and construct a service quality evaluation matrix: Where N represents the number of candidate services, and k represents the k-dimensional service quality evaluation index of each candidate service; S602, normalize the service quality evaluation matrix to generate a unit service quality evaluation matrix F. The calculation formula of the unit service quality evaluation matrix is ​​as follows: In the formula, F ij represents the service quality evaluation matrix, N represents the number of candidate services; S603: construct a weighted decision matrix V according to the mixed weight values ij , the weighted decision matrix V ij The calculation formula is as follows: V ij =F ij ′×w In the formula, F ij ′ represents the unit service quality evaluation matrix, w represents the mixed weight value; S604, based on the TOPSIS multi-attribute decision-making method, calculate the positive ideal point and the negative ideal point, and the calculation formula is as follows: Where V + Represents the positive ideal point of the indicator, which represents the maximum value of the service quality indicator among all candidate services. - Represents the negative ideal point of the indicator, which represents the minimum value of the service quality indicator among all candidate services. nj Denotes the weighted decision matrix V ij Elements in S605, calculating the distances from each candidate service to the positive ideal point and the negative ideal point, the calculation formula is as follows: In the formula, represents the distance from the i-th candidate service to the positive ideal point, represents the distance from the i-th candidate service to the negative ideal point, V ij represents the weighted decision matrix; S606, calculating the closeness between each candidate service and the expected service, the calculation formula is as follows: In the formula, CD i represents the closeness of the i-th candidate service, represents the distance from the i-th candidate service to the positive ideal point, represents the distance from the i-th candidate service to the negative ideal point, and n represents the number of candidate services; S607, sorting the fit degree corresponding to each candidate service in descending order according to the fit degree corresponding to each candidate service, and generating a fit degree sorting result based on the service quality evaluation index driven by user demand; S608: According to the closeness ranking result, select the candidate service ranked first in the closeness ranking result as the service discovery result.