Iot platform function test method and system, electronic device, and storage medium

By segmenting and processing word vectors in the interaction data between IoT platforms and terminals, and utilizing word embedding and prediction models, the problem of low testing efficiency of IoT platforms was solved, and accurate functional test results were achieved.

CN119892684BActive Publication Date: 2025-10-17E SURFING IOT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411723105.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-10-17
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Testing methods for IoT platforms rely on manual operation, which is inefficient and makes it difficult to accurately determine whether there are problems, especially when IoT terminals are unstable, making it difficult to determine the reason for the test failure.

Method used

By obtaining the interaction data between the platform and the terminal, word segmentation and word vector replacement processing are performed, the word vector characteristics are determined, word embedding processing is performed based on the number of messages, and the forward and reverse prediction models are used to determine the functional test results of the IoT platform.

Benefits of technology

It enables accurate functional testing under unstable IoT terminal conditions, reduces testing difficulty, and improves the accuracy of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892684B_ABST
    Figure CN119892684B_ABST
Patent Text Reader

Abstract

The application discloses an Internet of Things platform function test method and system, electronic equipment and a storage medium. The method comprises the following steps: obtaining interaction data between a platform and a terminal; performing word segmentation and word vector replacement processing on the interaction data to obtain word vector features; determining the number of messages corresponding to each first word in each use case based on the word vector features; the number of messages is the number of messages including preset words in each use case; performing word embedding processing on each message based on the number of messages to determine a feature vector; inputting the feature vector into a forward and reverse prediction model to obtain a prediction result, and determining a function test result according to the prediction result; the prediction result is the forward probability or reverse probability of each message in the use case. The application can accurately determine whether the Internet of Things platform has a function defect, which is beneficial to reducing the test difficulty and improving the accuracy of the test result. The application can be widely applied to the technical field of Internet of Things.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, and in particular to an Internet of Things platform function testing method and system, an electronic device, and a storage medium. BACKGROUND

[0002] With the rapid development of Internet of Things technology, stable operation of Internet of Things platforms and terminal devices has become a key factor affecting the performance of the entire Internet of Things system. However, due to various factors such as environment, hardware, and software, Internet of Things terminals often have unstable conditions, which brings great challenges to the testing of Internet of Things platforms. Specifically, when the test fails, it is not possible to determine whether the test failure is caused by the unstable operation of the terminal. The testing method in the related art often relies on manual operation, which is inefficient and difficult to accurately determine whether the Internet of Things platform has a problem. SUMMARY

[0003] The main purpose of the embodiments of the present application is to provide an efficient Internet of Things platform function testing method, system, electronic device, and storage medium.

[0004] To achieve the above-mentioned purpose, one aspect of the embodiments of the present application provides an Internet of Things platform function testing method, which comprises: obtaining interaction data between a platform and a terminal; the interaction data comprises a plurality of use cases; each use case comprises a plurality of messages; performing word segmentation and word vector replacement processing on the interaction data to obtain word vector features; determining the number of messages corresponding to each first word in each use case based on the word vector features; the number of messages is the number of messages that include a preset word in each use case; the preset word is a word similar to the first word; performing word embedding processing on each message based on the number of messages to determine a feature vector; inputting the feature vector into a forward and reverse prediction model to obtain a prediction result, and determining a function test result of the Internet of Things platform according to the prediction result; the prediction result is the forward probability or reverse probability of each message in the use case. The embodiments of the present application process the interaction data between the platform and the terminal, and obtain the feature vector through word embedding based on the number of messages, and then predict the function test result through the forward prediction model. The embodiments of the present application can accurately determine whether the Internet of Things platform has a functional defect, which is beneficial to reduce the testing difficulty and improve the accuracy of the test result.

[0005] In some embodiments, the method provided by the embodiments of the present application comprises:

[0006] For each word in the message, according to the first number and the number of messages, determine the first n embedded components; according to the second number and the number of messages, determine the remaining components embedded; the first number is the number of all positive cases, the second number is the number of all negative cases; the positive case is the case of successful communication of instructions between the platform and the terminal, and the negative case is the case of unsuccessful communication of instructions between the platform and the terminal; n is a positive integer;

[0007] According to the first n components and the remaining components, determine the feature vector.

[0008] In some embodiments, the method provided by the embodiments of the application, the first number and the number of messages, determining the first n embedded components, comprises:

[0009] Determine the i-th component as the quotient of the first use case number and the positive use case base; wherein the first use case number is the number of positive cases with the message number i-1, and the positive use case base is determined based on the first number and the second number; i is a positive integer less than n;

[0010] Determine the n-th component as the quotient of the second use case number and the positive use case base; wherein the second use case number is the number of positive cases with the message number not less than n-1.

[0011] In some embodiments, the method provided by the embodiments of the application, the second number and the number of messages, determining the remaining components embedded; comprises:

[0012] Determine the j-th component as the quotient of the third use case number and the negative use case base; wherein the third use case number is the number of negative cases with the message number j-n-1, and the negative use case base is determined based on the second number and the first number; j is a positive integer greater than n and less than m, and m is the length of the embedded word vector;

[0013] Determine the m-th component as the quotient of the fourth use case number and the negative use case base; wherein the fourth use case number is the number of negative cases with the message number not less than n-1.

[0014] In some embodiments, the method provided by the embodiments of the application, the feature vector is input into the positive and negative prediction model to obtain a prediction result, and the function test result of the Internet of Things platform is determined according to the prediction result, comprising:

[0015] Input the feature vector of the first negative case into the positive and negative prediction model to obtain a prediction result;

[0016] If the reverse probability of at least one of the prediction results is greater than a first threshold value, it is determined that the first reverse use case belongs to platform failure.

[0017] Alternatively, if the reverse probability of each of the prediction results is less than or equal to a first threshold value, it is determined that the first reverse use case belongs to terminal failure.

[0018] In some embodiments, the method provided by the embodiments of the present application includes:

[0019] performing natural segmentation on the interaction data to determine segmentation features;

[0020] determining, through a preset word vector table, a word vector feature corresponding to each second word in the segmentation features.

[0021] In some embodiments, the method provided by the embodiments of the present application includes:

[0022] If the second word is included in the word vector table, a word vector feature corresponding to the second word is determined in the word vector table;

[0023] If the second word is not included in the word vector table and the second word is an identifiable integer and a floating point number, a third word similar to the second word is found in the word vector table, and a word vector feature corresponding to the third word is determined as the word vector feature corresponding to the second word;

[0024] If the second word is not included in the word vector table and the second word is an unidentifiable integer and a floating point number, several fourth words adjacent to the second word are selected, and a word vector feature corresponding to the second word is determined through the word vector table according to several word vector features corresponding to the several fourth words.

[0025] To achieve the above-mentioned purpose, another aspect of the embodiments of the present application proposes an Internet of Things platform function test system, which includes:

[0026] A first module is configured to obtain interaction data between a platform and a terminal; the interaction data includes several use cases; each of the use cases includes several messages;

[0027] A second module is configured to perform segmentation and word vector replacement processing on the interaction data to obtain word vector features;

[0028] determine a number of messages corresponding to each first word in each use case based on the word vector feature; the number of messages is a number of messages including a preset word in each use case; the preset word is a word similar to the first word;

[0029] determine a feature vector by performing word embedding processing on each message based on the number of messages;

[0030] determine a feature vector by performing word embedding processing on each message based on the number of messages;

[0031] To achieve the above object, another aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program.

[0032] To achieve the above object, another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.

[0033] The embodiment of the present application at least has the following beneficial effects: the method provided by the embodiment of the present application comprises: obtaining interaction data between a platform and a terminal; the interaction data comprises a plurality of use cases; each use case comprises a plurality of messages; performing word segmentation and word vector replacement processing on the interaction data to obtain word vector features; determining a number of messages corresponding to each first word in each use case based on the word vector features; the number of messages is a number of messages including a preset word in each use case; the preset word is a word similar to the first word; determining a feature vector by performing word embedding processing on each message based on the number of messages; inputting the feature vector into a forward and reverse prediction model to obtain a prediction result, and determining a functional test result of the Internet of Things platform according to the prediction result; the prediction result is a forward probability or a reverse probability of each message in the use case. The embodiment of the present application processes the interaction data between the platform and the terminal, and obtains the feature vector by word embedding based on the number of messages, and then predicts by the forward prediction model to obtain the functional test result. The embodiment of the present application can accurately judge whether the Internet of Things platform has functional defects, which is beneficial to reduce the test difficulty and improve the accuracy of the test result. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 is a flowchart of an embodiment of the Internet of Things platform functional test method provided by the present application;

[0035] Figure 2 is a structural diagram of an embodiment of the Internet of Things platform function test architecture provided by the present application;

[0036] Figure 3 is a flowchart of another embodiment of the Internet of Things platform function test method provided by the present application;

[0037] Figure 4 is a flowchart of an embodiment of the word embedding process provided by the present application;

[0038] Figure 5 is a flowchart of an embodiment of the embedding process of the first n components provided by the present application;

[0039] Figure 6 is a flowchart of an embodiment of the embedding process of the remaining components provided by the present application;

[0040] Figure 7 is a flowchart of an embodiment of the fault judgment process provided by the present application;

[0041] Figure 8 is a flowchart of an embodiment of the data processing process provided by the present application;

[0042] Figure 9 is a structural diagram of the Internet of Things platform function test system provided by the present application;

[0043] Figure 10 is a hardware structural diagram of the electronic device provided by the present application. DETAILED DESCRIPTION

[0044] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application, but are only examples of devices and methods consistent with some aspects of the present application as described in the appended claims.

[0045] It can be understood that the terms "first", "second" and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".

[0046] The terms "at least one", "multiple", "each", "any" and the like used in the present application include one, two or more than two, multiple includes two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as understood by those skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0048] Before the embodiments of the present application are described in detail, first, some nouns and terms involved in the embodiments of the present application are described, and the nouns and terms involved in the embodiments of the present application are applicable to the following explanations.

[0049] Internet of Things platform: refers to a software platform based on Internet technology and sensor technology, used to realize Internet of Things application development, management and operation.

[0050] Physical network terminal: hardware devices such as smart light, smart meter, smart meter, smart circuit breaker and smart air conditioner.

[0051] Inherent uncertainty of Internet of Things terminal: such as low power consumption of the device, relatively inaccurate but sufficient devices used for project cost, unstable wireless network leading to unstable terminal.

[0052] With the rapid development of Internet of Things technology, the stability of Internet of Things platform and terminal device has become a key factor affecting the performance of the whole Internet of Things system. However, due to environment, hardware, software and other factors, Internet of Things terminal often exists in unstable condition, which brings great challenge to the test of Internet of Things platform. Traditional test method often relies on manual operation, which is low in efficiency and difficult to accurately judge whether there is a problem in the Internet of Things platform.

[0053] Therefore, the application provides an Internet of Things platform function test method, which collects instructions issued by the platform and response data of the terminal through automatic means, mines and analyzes the data through an artificial neural network, and accurately determines whether the Internet of Things platform has a problem in the case of inherent uncertainty of the Internet of Things terminal.

[0054] The Internet of Things platform function test method provided in the application is related to the technical field of Internet of Things. The Internet of Things platform function test method provided in the application can be applied to a terminal, can be applied to a server, and can also be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, and the like, but is not limited thereto. The server end can be configured as a stand-alone physical server, can be configured as a server cluster or a distributed system composed of multiple physical servers, can be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform, and the server can also be a node server in a blockchain network. The software can be an application for implementing the Internet of Things platform function test method, and the like, but is not limited to the above forms.

[0055] The application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The application can also be practiced in a distributed computing environment in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0056] It should be noted that in various specific embodiments of the present application, when relevant processing needs to be performed on data related to the identity or characteristics of the user, such as user information, user behavior data, user history data, and user location information, the user's permission or consent is obtained first, and the collection, use, and processing of such data comply with relevant laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user is obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for the normal operation of the embodiments of the present application is obtained.

[0057] Figure 1 is an optional flowchart of the Internet of Things platform function test method provided by the embodiments of the present application. Figure 1 The method in can include but is not limited to steps S100-S500.

[0058] Step S100, obtaining interaction data between the platform and the terminal; the interaction data includes a plurality of use cases; each use case includes a plurality of messages;

[0059] Step S200, performing word segmentation and word vector replacement processing on the interaction data to obtain word vector features;

[0060] Step S300, determining the number of messages corresponding to each first word in each use case based on the word vector features; the number of messages is the number of messages including the preset word in each use case; the preset word is a word similar to the first word;

[0061] Step S400, performing word embedding processing on each message based on the number of messages to determine a feature vector;

[0062] Step S500, inputting the feature vector into a forward and reverse prediction model to obtain a prediction result, and determining a function test result of the Internet of Things platform according to the prediction result; the prediction result is a forward probability or a reverse probability of each message in the use case.

[0063] The interaction data in the embodiments of the present application can realize data transmission between the platform and the terminal based on a self-defined script to obtain the interaction data. Specifically, referring to the structure shown in Figure 2 , the system includes an Internet of Things platform, an Internet of Things terminal, a data collection terminal (recording), and an artificial neural network data mining. The function test result in the present application can be a terminal fault or a platform fault.

[0064] In some embodiments, referring to the flowchart shown in Figure 3 , the function test process provided by the present application includes the following steps:

[0065] Step S11, the automation script simulates the human operation platform;

[0066] Step S12, the platform issues an instruction to the terminal;

[0067] Step S13, the terminal reports response data for the above instruction;

[0068] Step S14, record the instruction issued by the platform and the data of the terminal response, that is, obtain the interaction data;

[0069] Step S15, the data mining module mines the data of the success and failure of the platform instruction issuing, that is, determines the positive use case and the negative use case;

[0070] Step S16, the artificial neural network analyzes the data to obtain a prediction result.

[0071] Step S17, determine whether the error of this test belongs to the physical network platform or the terminal.

[0072] It should be noted that in the embodiments of the present application, if the function test result of a use case is passed, it is called a positive use case, otherwise it is called a negative use case, and a use case includes a plurality of messages. The positive use case and the negative use case in the embodiments of the present application are the real test results obtained by testing the interaction between the platform and the terminal. According to the test data / interaction data, it can be determined whether the instructions between the platform and the terminal are successfully conveyed. The word "pass" in the embodiments of the present application is embodied by a word vector feature, and the word vector feature is a word vector of a plurality of words. The word embedding processing in the embodiments of the present application is based on the aforementioned message number, and by preprocessing the message number, a feature vector is obtained.

[0073] In summary, the present application provides a test scheme for determining whether the business code of the Internet of Things platform has a functional defect by analyzing the interaction data between the platform and the terminal through an artificial neural network in the case of inherent uncertainty of the Internet of Things terminal. The present application is based on the actual situation of the green and energy-saving Internet of Things project which is generally implemented at the present stage, and with limited investment of users, an intelligent algorithm is used to replace manual checking of whether the Internet of Things platform code has a problem, thereby improving the test efficiency.

[0074] In some embodiments, as shown in Figure 4 The method provided by the embodiments of the present application is based on the message number, word embedding processing is performed on each message to determine a feature vector, which includes:

[0075] Step S410, for each word in the message, determining the first n components embedded according to the first number and the number of messages; determining the remaining components embedded according to the second number and the number of messages; the first number is the number of all positive cases, and the second number is the number of all negative cases; the positive case is a case of successful communication of instructions between the platform and the terminal, and the negative case is a case of unsuccessful communication of instructions between the platform and the terminal; n is a positive integer;

[0076] Step S420, determining the feature vector according to the first n components and the remaining components.

[0077] In some possible implementation manners, the message is subjected to word embedding processing, that is, the number of messages is preprocessed to obtain a feature vector. In some embodiments, the feature vector can be determined based on the number of message of the positive case and the number of positive cases; and the feature vector can be determined based on the number of message of the negative case and the number of negative cases. The application does not limit the specific logic of the feature vector determination process, and a person skilled in the art can set the calculation logic according to the demand.

[0078] In some embodiments, referring to FIG. 4, the method provided by the embodiment of the application comprises the following steps. Figure 5 Step S411, determining the i-th component as the quotient of the first case number and the positive case base number; wherein the first case number is the number of positive cases with the number of messages being i-1, and the positive case base number is determined based on the first number and the second number; i is a positive integer less than n.

[0079] Step S412, determining the n-th component as the quotient of the second case number and the positive case base number; wherein the second case number is the number of positive cases with the number of messages being no less than n-1.

[0080] In some possible implementation manners, m in the embodiment of the application can be 64, and the corresponding n can be 32 or 16. In other embodiments, m in the embodiment of the application can be 32, and the value of n is adjusted accordingly; similarly, m in the embodiment of the application can also be 128, and the value of n is adjusted accordingly. The application does not limit the specific values of m and n, and a person skilled in the art can set appropriate values according to the actual application scenario, data transmission frequency, etc.

[0081] In some embodiments, referring to FIG. 4, the method provided by the embodiment of the application comprises the following steps.

[0082] Figure 6 Step S420, determining the feature vector according to the first n components and the remaining components.

[0083] ​Step S421, determining the jth component as the quotient of the third use case number and the reverse use case base number; wherein the third use case number is the number of reverse use cases with the number of messages being j-n-1, and the reverse use case base number is determined based on the second number and the first number; j is a positive integer greater than n and less than m, and m is the length of the embedded word vector;

[0084] Step S422, determining the mth component as the quotient of the fourth use case number and the reverse use case base number; wherein the fourth use case number is the number of reverse use cases with the number of messages being no less than n-1.

[0085] In some possible implementations, after the interactive data is processed by word segmentation and word vector replacement, the word embedding process provided by the embodiment of the application performs word embedding on each message and each word, but the embedding manner is not searched from the pre-trained word vector table, but a vector with a length of 64 is calculated according to the number of similar messages counted above through the following steps:

[0086] Step S31, for i from 1 to 31, the ith component of word embedding is the use case number of similar words appearing in the positive use case with the number of messages being i-1 divided by the positive use case base number, wherein the positive use case base number is equal to the total number of positive use cases plus ten percent of the total use case number.

[0087] Step S32, for i=32 (i.e., n=32 in the embodiment of the application), the ith component of word embedding is the use case number of similar words appearing in the positive use case with the number of messages being no less than 31 divided by the positive use case base number, wherein the positive use case base number is equal to the total number of positive use cases plus ten percent of the total use case number.

[0088] Step S33, for i from 33 to 63 (i in this process and step S34 is j in the embodiment of the application), the ith component of word embedding is the use case number of similar words appearing in the reverse use case with the number of messages being i-33 divided by the reverse use case base number, wherein the reverse use case base number is equal to the total number of reverse use cases plus ten percent of the total use case number.

[0089] Step S34, for i=64, the ith component of word embedding is the use case number of similar words appearing in the reverse use case with the number of messages being no less than 31 divided by the reverse use case base number, wherein the reverse use case base number is equal to the total number of reverse use cases plus ten percent of the total use case number (of course, it can be understood that the calculation formula of the positive use case and the reverse use case can be adjusted, and the application does not make specific limitation).

[0090] In some embodiments, referring to FIG. 1, Figure 7 As shown in the figure, the method provided by the embodiment of the application inputs the feature vector into the forward and reverse prediction model to obtain a prediction result, and determines the function test result of the Internet of Things platform according to the prediction result, including:

[0091] Step S510: Input the feature vector of the first negative case into the forward and reverse prediction models to obtain a prediction result;

[0092] Step S520: If at least one reverse probability exists in the prediction result and is greater than a first threshold, it is determined that the first negative use case is a platform failure;

[0093] Alternatively, in step S530, if the reverse probability of each message in the prediction result is less than or equal to the first threshold, it is determined that the first negative use case belongs to a terminal failure.

[0094] In some possible implementations, the forward direction prediction model in the embodiments of the present application may be an artificial intelligence model or other models that can implement classification, and the present application does not make any specific limitations.

[0095] The process of evaluating the platform function based on the prediction results of the positive direction prediction model is as follows:

[0096] Step S41: The word embedding results of each message of each negative use case are sent to a neural network with an LSTM layer, a fully connected layer and a Re lu layer for classification, and the positive and negative prediction results are output after classification.

[0097] Step S42: For each message in each negative use case, if at least one message has a reverse probability greater than 0.5, the negative use case is considered to be a functional error in the IoT service platform. The use case, along with the messages with a reverse probability greater than 0.5 and their reverse probabilities, are output for the tester to record as test results.

[0098] Step S43: If the reverse probability of each negative use case is not greater than 0.5, it is considered that the use case is caused by an unstable terminal environment, and the IoT service platform function test can be considered to have passed.

[0099] In some embodiments, reference Figure 8 As shown, the method provided in the embodiment of the present application performs word segmentation and word vector replacement processing on the interaction data to obtain word vector features, including:

[0100] Step S210: Perform natural word segmentation on the interactive data to determine word segmentation features;

[0101] Step S220: For each second word in the word segmentation feature, determine the word vector feature corresponding to the second word through a preset word vector table.

[0102] In some possible implementations, the first word, second word, third word, fourth word, etc. in the embodiments of the present application all refer to words, and are numbered for convenience of description.

[0103] In some embodiments, the method provided by the embodiments of the present application determines, for each second word in the word segmentation features, a word vector feature corresponding to the second word through a preset word vector table, including:

[0104] If the second word is contained in the word vector table, the word vector feature corresponding to the second word is determined in the word vector table;

[0105] If the second word is not contained in the word vector table and the second word is an identifiable integer and a floating point number, a third word similar to the second word is found in the word vector table, and the word vector feature corresponding to the third word is determined as the word vector feature corresponding to the second word.

[0106] If the second word is not contained in the word vector table and the second word is an unidentifiable integer and a floating point number, a plurality of fourth words adjacent to the second word are selected, and the word vector feature corresponding to the second word is determined through the word vector table according to a plurality of word vector features corresponding to the plurality of fourth words.

[0107] In the embodiments of the present application, between steps S11-S17 and steps S31-S34, the following steps are further included.

[0108] In step S21, the terminal and platform interaction data recorded in a use case is subjected to natural word segmentation. Here, the natural word segmentation is mainly to extract Chinese and English words separated by punctuation symbols from structured data such as XML and JSON, without the need for intelligent word segmentation of Chinese, but the binary data and Base64 data need to be preprocessed into a text format that can be subjected to natural word segmentation.

[0109] In step S22, the corresponding word vector is found using a pre-trained word vector table for the word segmentation result. The word vector of an identifiable integer and a floating point number that is not in the word embedding table is replaced by the closest word vector in the table value, i.e., the word vector feature of the second word is determined through a third word similar to the second word. The word vector of an unidentifiable integer and a floating point number is obtained by averaging the word vectors of the words before and after it, i.e., the word vector feature of the second word is determined through a plurality of fourth words. It should be noted that the fourth words can come from any message / use case containing the second word. The fourth words can represent the two words immediately before and after the second word, or the fourth words can represent N words immediately before and after the second word. The present application does not limit the number of fourth words.

[0110] In step S23, for each word in the use case, the number of similar word messages in each positive use case and negative use case is counted, respectively. Similar words refer to words with an Euclidean distance of the word vector less than a threshold F.

[0111] It should be noted that the pre-trained word vector table used in the present application can be enhanced by recording the message to adjust the word vector or add new words. In some embodiments, the word vector table can be obtained from relevant public information, or can be established by itself based on specific applications, and the present application does not limit the source of the word vector table.

[0112] Next, the scheme of the embodiment of the present application will be described in detail in combination with a specific application example:

[0113] The service scans the low-power terminal through the edge gateway, and requires the online low-power terminal to reply. However, due to the low-power terminal, which is in sleep or processing other transactions when receiving the instruction, it may not be able to receive the instruction and reply every time. If manual testing is used, the terminal sometimes replies and sometimes does not reply, and the tester cannot determine whether the scanning instruction issued by the service platform is problematic or the terminal does not reply to the scanning instruction normally issued by the service platform. Other means such as simulation, log checking, or terminal technical personnel cooperation are needed to determine, which leads to a sharp increase in testing technical difficulty and cost.

[0114] To this end, the scheme provided by the present application is implemented as follows:

[0115] Step S51. Execute the automated script to scan the online terminals in multiple zones through the platform, execute 5000 times in each zone, and collect the results of each functional test whether the corresponding online terminal is found. Finding the corresponding online terminal is a positive use case, and failing to find it is a negative use case.

[0116] Step S52. The data aggregation terminal records the instructions issued by the platform and the data of the terminal response, and statistically analyzes the feature vectors according to the functional test results collected by the automated script by performing natural word segmentation on the terminal and platform interaction data according to the method.

[0117] Step S53. The feature vector is put into the artificial neural network for classification. If the output of the neural network is greater than 0.5, the gateway scanning service of the Internet of Things service platform has a code function defect problem. For example, in some cases, the business code has a bug, resulting in no scanning instruction being issued or incorrect scanning instruction parameters. In this case, the feature vector of several keywords contained in the scanning instruction will be abnormal, resulting in the output of the neural network being greater than 0.5. Conversely, if the business code has no bug, the feature vector will not be abnormal, and the output of the neural network will not be greater than 0.5.

[0118] Currently, when testing an Internet of Things platform, because of inherent uncertainty of the Internet of Things terminal, a lot of time is needed to test whether the platform has functional defects. Generally, others will test the platform and the terminal separately, and simulate the terminal when testing the platform, but this will have a certain gap with the actual effect. The present application proposes a method, the system determines the historical execution data of the platform and the terminal according to the recorded interaction data between the terminal and the platform, and judges the platform and the terminal through an artificial neural network without manual judgment, and through data mining of the artificial neural network, realizes the rapid testing of the business of the Internet of Things business platform.

[0119] The embodiment of the present application accurately determines whether the business code of the Internet of Things business platform has functional defects in the case of inherent uncertainty of the terminal. The method has universality and does not need to be customized for specific businesses. The embodiment of the present application is helpful to reduce the difficulty and workload of functional testing.

[0120] The embodiment of the present application judges by recording the interaction data between the Internet of Things platform and the terminal. The embodiment of the present application counts the number of occurrences of words in messages in other messages by the similarity of word embedding. The embodiment of the present application preprocesses the number of occurrences of words in messages in other messages into a vector, and then classifies through a neural network with an LSTM layer.

[0121] Please refer to Figure 9 The embodiment of the present application also provides an Internet of Things platform functional testing system, which can implement the above-mentioned Internet of Things platform functional testing method, and the system comprises:

[0122] The first module 810 is configured to obtain interaction data between the platform and the terminal; the interaction data comprises a plurality of use cases; each use case comprises a plurality of messages;

[0123] The second module 820 is configured to perform word segmentation and word vector replacement processing on the interaction data to obtain word vector features;

[0124] The third module 830 is configured to determine the number of messages corresponding to each first word in each use case based on the word vector features; the number of messages is the number of messages including the preset word in each use case; the preset word is a word similar to the first word;

[0125] The fourth module 840 is configured to perform word embedding processing on each message based on the number of messages to determine a feature vector;

[0126] The fifth module 850 is configured to input the feature vector into a forward and reverse prediction model to obtain a prediction result, and determine a functional testing result of the Internet of Things platform according to the prediction result; the prediction result is a forward probability or a reverse probability of each message in the use case.

[0127] It can be understood that the contents in the above method embodiments are all applicable to the present system embodiments, the present system embodiments specifically implement the functions same as those of the above method embodiments, and achieve the same beneficial effects as those of the above method embodiments.

[0128] The present application also provides an electronic device, which comprises a memory and a processor. The memory stores a computer program, and the processor implements the above-mentioned method for testing the function of the Internet of Things platform when executing the computer program. The electronic device can be any smart terminal, such as a tablet computer or a vehicle-mounted computer.

[0129] It can be understood that the contents in the above method embodiments are all applicable to the present device embodiments, the present device embodiments specifically implement the functions same as those of the above method embodiments, and achieve the same beneficial effects as those of the above method embodiments.

[0130] Please refer to Figure 10 , Figure 10 The hardware structure of the electronic device of another embodiment is illustrated, which comprises:

[0131] The processor 901 can be implemented in the form of a general CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the present application;

[0132] The memory 902 can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 902 can store an operating system and other application programs. When the technical solutions provided by the present application are implemented by software or firmware, the related program codes are stored in the memory 902 and are called and executed by the processor 901 to implement the method for testing the function of the Internet of Things platform;

[0133] The input / output interface 903 is used to realize information input and output;

[0134] The communication interface 904 is used to realize the communication interaction between the present device and other devices. The communication can be realized in a wired manner (for example, a USB, a network cable, etc.) or in a wireless manner (for example, a mobile network, a WI-FI, Bluetooth, etc.);

[0135] A bus 905 transmits information between various components (for example, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) in the device.

[0136] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are communicatively connected to each other within the device through the bus 905.

[0137] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the Internet of Things platform function test method.

[0138] It can be understood that the contents in the above method embodiments are applicable to the present storage medium embodiment, the present storage medium embodiment specifically realizes the same functions as the above method embodiments, and achieves the same beneficial effects as the above method embodiments.

[0139] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0140] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0141] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures shown, or combine certain steps, or different steps.

[0142] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the present embodiment.

[0143] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the function modules / units in the system and the device can be implemented as software, firmware, hardware or appropriate combination thereof.

[0144] The terms "first", "second", "third", "fourth" etc. (if any) in the description of the application and in the claims that follow are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order. It is to be understood that the use of these terms herein is to be construed to cover the embodiments of the application whether or not the embodiments are described using the same term. Furthermore, the terms "comprise", "comprising", "include", "including", and "has", "having" and variants thereof are to be construed in a non-exclusive manner when used in this description and in the claims that follow. For example, when used in the context of a process, method, system, product or apparatus, the term "comprising" means that the process, method, system, product or apparatus includes the recited steps or units, but can also include additional steps or units not specifically recited.

[0145] It should be understood that, in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be singular or plural.

[0146] In several embodiments provided in the present application, 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 above-mentioned units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0147] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0149] 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 application 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, and the computer software product is stored in a storage medium, including multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store programs.

[0150] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A functional testing method for an Internet of Things platform, characterized in that: The method comprises: Acquire interaction data between the platform and the terminal; the interaction data includes a plurality of use cases; each of the use cases includes a plurality of messages; Perform word segmentation and word vector replacement processing on the interaction data to obtain word vector features; Based on the word vector feature, determining the number of messages corresponding to each first word in each of the use cases; the number of messages is the number of messages including a preset word in each of the use cases; the preset word is a word similar to the first word; Based on the number of messages, performing word embedding processing on each message to determine a feature vector; The feature vector is input into a forward and reverse prediction model to obtain a prediction result, and a functional test result of the Internet of Things platform is determined based on the prediction result; the prediction result is the forward probability or reverse probability of each message in the use case.

2. The method according to claim 1, characterized in that The performing word embedding processing on each of the messages based on the number of the messages to determine a feature vector includes: For each word in the message, determine the first n components of the embedding according to the first number and the number of messages; determine the remaining components of the embedding according to the second number and the number of messages; the first number is the number of all positive use cases, and the second number is the number of all negative use cases; the positive use cases are use cases in which the instruction between the platform and the terminal is successfully communicated, and the negative use cases are use cases in which the instruction between the platform and the terminal is not successfully communicated; n is a positive integer; A feature vector is determined based on the first n components and the remaining components.

3. The method according to claim 2, characterized in that Determining the first n components to be embedded according to the first number and the number of messages includes: Determine the i-th component as the quotient of the first number of use cases and the positive use case cardinality; wherein the first number of use cases is the number of positive use cases with the number of messages being i-1, and the positive use case cardinality is determined based on the first number and the second number; and i is a positive integer less than n; Determine the nth component as the quotient of the second number of use cases and the cardinality of positive use cases; wherein the second number of use cases is the number of positive use cases whose number of messages is not less than n-1.

4. The method according to claim 2, characterized in that The step of determining the remaining component to be embedded according to the second number and the number of messages comprises: Determine the jth component as the quotient of the third number of use cases and the cardinality of negative use cases; wherein the third number of use cases is the number of negative use cases in which the number of messages is jn-1, and the cardinality of negative use cases is determined based on the second number and the first number; j is a positive integer greater than n and less than m, and m is the length of the embedded word vector; Determine the mth component as the quotient of the fourth number of use cases and the cardinality of negative use cases; wherein the fourth number of use cases is the number of negative use cases whose number of messages is not less than n-1.

5. The method according to claim 1, wherein The step of inputting the feature vector into a forward and reverse prediction model to obtain a prediction result, and determining a functional test result of the Internet of Things platform based on the prediction result, includes: Input the feature vector of the first negative case into the forward and reverse prediction models to obtain the prediction results; If at least one of the reverse probabilities in the prediction results is greater than a first threshold, determining that the first negative use case is a platform failure; Alternatively, if in the prediction result, the reverse probability of each of the messages is less than or equal to a first threshold, it is determined that the first negative use case belongs to a terminal failure.

6. The method according to claim 1, characterized in that The word segmentation and word vector replacement processing of the interaction data to obtain word vector features includes: Performing natural word segmentation on the interaction data to determine word segmentation features; For each second word in the word segmentation feature, a word vector feature corresponding to the second word is determined through a preset word vector table.

7. The method according to claim 6, characterized in that The step of determining a word vector feature corresponding to each second word in the word segmentation feature by using a preset word vector table includes: If the word vector table includes the second word, determining a word vector feature corresponding to the second word in the word vector table; If the word vector table does not contain the second word, and the second word is a recognizable integer and floating-point number, searching the word vector table for a third word similar to the second word, and determining that the word vector feature corresponding to the third word is the word vector feature corresponding to the second word; If the second word is not included in the word vector table and the second word is an unrecognizable integer and floating-point number, select several fourth words adjacent to the second word, and determine the word vector feature corresponding to the second word through the word vector table based on several word vector features corresponding to the several fourth words.

8. A functional testing system for an Internet of Things platform, characterized in that: The system comprises: The first module is used to obtain interaction data between the platform and the terminal; the interaction data includes a plurality of use cases; each of the use cases includes a plurality of messages; The second module is used to perform word segmentation and word vector replacement processing on the interaction data to obtain word vector features; A third module is configured to determine, based on the word vector feature, the number of messages corresponding to each first word in each of the use cases; the number of messages is the number of messages including a preset word in each of the use cases; the preset word is a word similar to the first word; A fourth module is configured to perform word embedding processing on each of the messages based on the number of the messages to determine a feature vector; The fifth module is used to input the feature vector into the forward and reverse prediction model to obtain a prediction result, and determine the functional test result of the Internet of Things platform based on the prediction result; the prediction result is the forward probability or reverse probability of each message in the use case.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Internet-of-Things data flow detection method based on double LSTM iterative learning

    CN111866128A

  • Fault detection method, device and system and computer readable storage medium

    CN112804336A