A component state timing prediction method, device, equipment and storage medium

By establishing and superimposing sequence prediction models and time prediction models, the accuracy of component state timing prediction is solved, real-time prediction of component state and dynamic resource segmentation is realized, and the efficiency of component performance evaluation and optimization is improved.

CN114117929BActive Publication Date: 2024-11-05THE CHINESE UNIV OF HONG KONG (SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111457869.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2024-11-05
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

Existing timing prediction methods are not suitable for component state datasets, especially in component performance evaluation and real-time optimization, making it difficult to accurately predict the future state of a component to dynamically segment resources.

Method used

By obtaining the component state sequence data set, converting it into one-hot encoding queue, establishing and training the sequence prediction model and the time prediction model, superimposing it to obtain the time sequence prediction model, and predicting the component state and time interval in real time.

Benefits of technology

Accurate prediction of component state timing is realized, and dynamic segmentation of components in heterogeneous resources is supported, which improves the efficiency of component performance evaluation and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114117929B_ABST
    Figure CN114117929B_ABST
Patent Text Reader

Abstract

The present application discloses a component state timing prediction method, device, equipment and storage medium, the method comprising: obtaining a component state sequence data set and converting it into a one-hot coding queue; using the one-hot coding corresponding to the set time step as the input queue, and the next step as the output label value, to establish and train a sequence prediction model; using the one-hot coding corresponding to a set number of component states as the input queue, and the time interval between the last component state and the next component state as the output label value, to establish and train a time prediction model; superimposing the sequence prediction model and the time prediction model to obtain a timing prediction model; inputting the component state information to be tested into the timing prediction model, and outputting the one-hot coding and time interval prediction value corresponding to the component state occurring in the next step. In this way, the component state timing generated by the user calling the component can be predicted in real time, and the prediction result is highly accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of component state timing prediction, and in particular to a component state timing prediction method, device, equipment and storage medium. Background Art

[0002] Component performance evaluation refers to the evaluation and estimation of the performance of each component when it is distributed and run on heterogeneous resources after the software is deconstructed. Using the statistical prediction method, by recording the execution timetable of all components and calculating the time difference between the component entry and exit, the component running time is directly obtained, and then a correlation prediction model between multi-user multi-device and component running time is established. Through this correlation prediction model, it is planned to dynamically partition components to the optimal resource location according to different optimization goals. However, real-time optimization requires instant calculation of the optimal partitioning plan, which requires predicting the future component status and dynamically calculating the corresponding partitioning plan.

[0003] Since there are many functions in the program and the time step generated by a user operation is usually large and not fixed, most of the existing methods for timing prediction of behaviors and nodes are applicable to large graph relationship datasets such as arxiv and dblp. Such datasets usually have a certain time step, and the relationship between each node expresses a reference relationship rather than a transfer relationship, which is not applicable to component state datasets.

[0004] Therefore, how to solve the above-mentioned timing prediction problem for component status is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a component state timing prediction method, device, equipment and storage medium, which can predict the component state timing generated by the user calling the component in real time, and the prediction result is highly accurate. The specific scheme is as follows:

[0006] A component state timing prediction method, comprising:

[0007] Obtain component state sequence data sets, and convert all of the component state sequence data sets into one-hot encoding queues;

[0008] The one-hot encoding corresponding to the set time step is used as the input queue, and the one-hot encoding corresponding to the next set time step is used as the output label value to build and train the sequence prediction model;

[0009] The one-hot encoding corresponding to the set number of component states is used as the input queue, and the time interval between the last component state and the next component state in the set number of component states is used as the output label value to establish and train a time prediction model;

[0010] Superimposing the sequence prediction model and the time prediction model to obtain a time series prediction model;

[0011] The state information of the component to be tested is input into the timing prediction model, and the one-hot encoding and time interval prediction value corresponding to the component state occurring next are output.

[0012] Preferably, in the above-mentioned component state timing prediction method provided by an embodiment of the present invention, the sequence prediction model includes a first LSTM layer having 128 units, an activation function of hyperbolic tangent, and an input shape of a one-hot length corresponding to the set time step, and a first fully connected layer having an activation function of softmax and an output shape of a one-hot length corresponding to the set time step.

[0013] Preferably, in the above-mentioned component state timing prediction method provided by an embodiment of the present invention, the time prediction model includes a second LSTM layer having 128 units, an activation function of hyperbolic tangent, an input shape of a one-hot length corresponding to the set number of component states, and a second fully connected layer with an output shape of 1.

[0014] Preferably, in the above-mentioned component state timing prediction method provided by the embodiment of the present invention, the one-hot length corresponding to the set time step is the same as the one-hot length corresponding to the set number of component states.

[0015] Preferably, in the above-mentioned component state timing prediction method provided by an embodiment of the present invention, converting all the component state sequence data sets into a one-hot encoding queue includes:

[0016] Obtain the names of all components in all the component state sequence data sets by a reverse method, and add a start state and an end state to each component respectively;

[0017] According to the obtained name, the added start state and end state, all component states are encoded to obtain a one-hot encoding queue.

[0018] The embodiment of the present invention further provides a component state timing prediction device, comprising:

[0019] A coding queue conversion module, used to obtain component state sequence data sets and convert all of the component state sequence data sets into one-hot coding queues;

[0020] The sequence prediction model building module is used to take the one-hot encoding corresponding to the set time step as the input queue, and take the one-hot encoding corresponding to the next set time step as the output label value to build and train the sequence prediction model;

[0021] A time prediction model building module is used to take the one-hot encoding corresponding to the set number of component states as an input queue, and take the time interval between the last component state and the next component state in the set number of component states as an output label value, to build and train a time prediction model;

[0022] A model superposition module, used for superimposing the sequence prediction model and the time prediction model to obtain a time series prediction model;

[0023] The timing prediction module is used to input the state information of the component to be tested into the timing prediction model, and output the one-hot code and time interval prediction value corresponding to the component state occurring next.

[0024] Preferably, in the above-mentioned component state timing prediction device provided by an embodiment of the present invention, the sequence prediction model includes a first LSTM layer having 128 units, an activation function of hyperbolic tangent, and an input shape of a one-hot length corresponding to the set time step, and a first fully connected layer having an activation function of softmax and an output shape of a one-hot length corresponding to the set time step.

[0025] Preferably, in the above-mentioned component state timing prediction device provided by an embodiment of the present invention, the time prediction model includes a second LSTM layer having 128 units, an activation function of hyperbolic tangent, an input shape of a one-hot length corresponding to the set number of component states, and a second fully connected layer with an output shape of 1.

[0026] An embodiment of the present invention further provides a component state timing prediction device, comprising a processor and a memory, wherein the processor implements the above-mentioned component state timing prediction method provided by the embodiment of the present invention when executing a computer program stored in the memory.

[0027] An embodiment of the present invention further provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the component state timing prediction method provided by the embodiment of the present invention is implemented.

[0028] It can be seen from the above technical scheme that a component state timing prediction method provided by the present invention includes: obtaining a component state sequence data set, and converting all component state sequence data sets into a one-hot coding queue; taking the one-hot coding corresponding to the set time step as the input queue, and taking the one-hot coding corresponding to the next set time step as the output label value, establishing and training a sequence prediction model; taking the one-hot coding corresponding to a set number of component states as the input queue, and taking the time interval between the last component state and the next component state in the set number of component states as the output label value, establishing and training a time prediction model; superimposing the sequence prediction model and the time prediction model to obtain a timing prediction model; inputting the component state information to be tested into the timing prediction model, and outputting the one-hot coding and time interval prediction value corresponding to the component state occurring in the next step.

[0029] The above-mentioned LSTM-based component state timing prediction method provided by the present invention establishes and trains a sequence prediction model and a time prediction model, and superimposes the sequence prediction model and the time prediction model to obtain a timing prediction model. The time prediction model can be used to output the component state and time interval that will occur next according to the current component state, thereby realizing real-time prediction of the component state timing generated by the user calling the component, and the prediction result has high accuracy.

[0030] In addition, the present invention also provides corresponding devices, equipment and computer-readable storage media for the component state timing prediction method, which further makes the above method more practical. The device, equipment and computer-readable storage medium have corresponding advantages. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0032] Figure 1 A flowchart of a component state timing prediction method provided by an embodiment of the present invention;

[0033] Figure 2 A schematic diagram of the structure of a device for predicting component status timing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] The present invention provides a method for predicting component status timing. Figure 1 As shown, the following steps are included:

[0036] S101, obtaining component state sequence data sets, and converting all component state sequence data sets into one-hot encoding queues;

[0037] In practical applications, the user's historical component state call records, including component names, component state information, etc., can be collected as component state sequence data sets. In specific implementation, all component state sequence data sets are converted into one-hot encoding queues, which can specifically include: obtaining the names of all components in all component state sequence data sets through the reverse method, and adding a start state and an end state to each component respectively; encoding all component states according to the obtained names, the added start state and the end state. Through this encoding method, all component state sequence data sets can be converted into one-hot encoding queues.

[0038] It should be noted that the converted one-hot encoding queue can form a training data set according to the set rules.

[0039] S102, using the one-hot code corresponding to the set time step as the input queue, and using the one-hot code corresponding to the next set time step as the output label value, to establish and train a sequence prediction model;

[0040] In practical applications, the one-hot encoding queue can be split according to the set time step to split the one-hot encoding queue into multiple first training data sets of one-hot length corresponding to the set time step. If the set time step is 15, the one-hot encoding queue can be split into multiple first training data sets of one-hot length 15.

[0041] Specifically, a first training data set may be used as an input queue, and another first training data set adjacent to the first training data set may be used as an output label value, so as to establish and train a sequence prediction model.

[0042] S103, using the one-hot codes corresponding to the set number of component states as the input queue, and using the time interval between the last component state and the next component state in the set number of component states as the output label value, to establish and train a time prediction model;

[0043] In practical applications, the one-hot encoding queue can be divided according to a set number of component states to divide the one-hot encoding queue into multiple second training data sets of one-hot length corresponding to the set time step. If the set number of component states is 15, the one-hot encoding queue can be divided into multiple second training data sets of one-hot length 15.

[0044] Specifically, a second training data set can be used as an input queue, and the time interval between the last component state in the second training data set and the first component state in another adjacent second training data set can be used as an output label value, so as to establish and train a time prediction model.

[0045] S104, superimposing the sequence prediction model and the time prediction model to obtain a time series prediction model;

[0046] S105 , input the state information of the component to be tested into the timing prediction model, and output the one-hot code and time interval prediction value corresponding to the component state occurring in the next step.

[0047] In the above-mentioned component state timing prediction method provided in an embodiment of the present invention, a sequence prediction model and a time prediction model are established and trained, and the sequence prediction model and the time prediction model are superimposed to obtain a timing prediction model. The time prediction model can be used to output the component state and time interval that will occur next according to the current component state, thereby realizing real-time prediction of the component state timing generated by the user calling the component, and the prediction result has high accuracy.

[0048] In a specific implementation, in the above-mentioned component state timing prediction method provided in an embodiment of the present invention, the above-mentioned sequence prediction model may include a first LSTM layer having 128 units, an activation function of hyperbolic tangent, and an input shape of a one-hot length corresponding to a set time step, and a first fully connected layer having an activation function of softmax and an output shape of a one-hot length corresponding to the set time step.

[0049] Specifically, the above sequence prediction model can be obtained through an LSTM layer with 128 units, an activation function of hyperbolic tangent, an input shape of one-hot length (such as 15) and a fully connected layer with an activation function of softmax and an output shape of one-hot length, and finally obtain an output component state one-hot encoding.

[0050] In a specific implementation, in the above-mentioned component state timing prediction method provided in an embodiment of the present invention, the above-mentioned time prediction model may include a second LSTM layer having 128 units, an activation function of hyperbolic tangent, an input shape of a one-hot length corresponding to a set number of component states, and a second fully connected layer with an output shape of 1.

[0051] Specifically, the above time prediction model can be obtained through an LSTM layer with 128 units, an activation function of hyperbolic tangent, an input shape of one-hot length (such as 15) and a fully connected layer with an output shape of 1, and finally obtain an output time prediction value.

[0052] In a specific implementation, in the above-mentioned component state timing prediction method provided in an embodiment of the present invention, in order to improve the computational efficiency of the model, the one-hot length corresponding to the set time step and the one-hot length corresponding to the set number of component states can be set to be the same.

[0053] It should be noted that in the above-mentioned component state timing prediction method provided by the embodiment of the present invention, after the program is executed, the component state sequence data set can be updated, that is, each time the user uses the program, the training set data will be updated again. The test set can be the user's latest operation set, that is, the component state sequence data set obtained from the most recent operation of opening the program to closing the program.

[0054] It can be understood that the above-mentioned component state timing prediction method provided by the embodiment of the present invention predicts the timing of components in the program. Compared with general behavior or state sequence prediction, it can make real-time predictions on the running status of components; and predicts the component state time interval. Compared with other sequence predictions, it has an additional time dimension and can predict the time interval of component state occurrence.

[0055] In addition, the above-mentioned component state timing prediction method provided by the embodiment of the present invention has a very large application prospect. The predicted component running time can be used as a reference for the dynamic segmentation plan; the relationship model of the device and component running time can be established according to the different predicted timings of different devices; in addition, the user behavior model can be established according to the different component timings of different users.

[0056] Based on the same inventive concept, an embodiment of the present invention also provides a component state timing prediction device. Since the principle of solving the problem by the device is similar to that of the aforementioned component state timing prediction method, the implementation of the device can refer to the implementation of the component state timing prediction method, and the repeated parts will not be repeated.

[0057] In specific implementation, the component state timing prediction device provided by the embodiment of the present invention is as follows: Figure 2 As shown, specifically including:

[0058] The encoding queue conversion module 11 is used to obtain component state sequence data sets and convert all component state sequence data sets into one-hot encoding queues;

[0059] A sequence prediction model building module 12 is used to take the one-hot encoding corresponding to the set time step as an input queue, and take the one-hot encoding corresponding to the next set time step as an output label value, to build and train a sequence prediction model;

[0060] A time prediction model building module 13 is used to use the one-hot encoding corresponding to the set number of component states as an input queue, and use the time interval between the last component state and the next component state in the set number of component states as an output label value to build and train a time prediction model;

[0061] A model superposition module 14 is used to superimpose the sequence prediction model and the time prediction model to obtain a time series prediction model;

[0062] The timing prediction module 15 is used to input the state information of the component to be tested into the timing prediction model, and output the one-hot code and time interval prediction value corresponding to the component state occurring in the next step.

[0063] In the above-mentioned component state timing prediction device provided in the embodiment of the present invention, through the interaction of the above-mentioned five modules, the component state and time interval that will occur next can be output according to the current component state, thereby realizing real-time prediction of the component state timing generated by the user calling the component, and the prediction result has high accuracy.

[0064] In a specific implementation, in the above-mentioned component state timing prediction device provided in an embodiment of the present invention, the above-mentioned sequence prediction model may include a first LSTM layer having 128 units, an activation function of hyperbolic tangent, and an input shape of a one-hot length corresponding to a set time step, and a first fully connected layer having an activation function of softmax and an output shape of a one-hot length corresponding to the set time step.

[0065] Specifically, the above sequence prediction model can be obtained through an LSTM layer with 128 units, an activation function of hyperbolic tangent, an input shape of one-hot length (such as 15) and a fully connected layer with an activation function of softmax and an output shape of one-hot length, and finally obtain an output component state one-hot encoding.

[0066] In a specific implementation, in the above-mentioned component state timing prediction device provided in an embodiment of the present invention, the above-mentioned time prediction model may include a second LSTM layer having 128 units, an activation function of hyperbolic tangent, an input shape of a one-hot length corresponding to a set number of component states, and a second fully connected layer with an output shape of 1.

[0067] Specifically, the above time prediction model can be obtained through an LSTM layer with 128 units, an activation function of hyperbolic tangent, an input shape of one-hot length (such as 15) and a fully connected layer with an output shape of 1, and finally obtain an output time prediction value.

[0068] For more specific working processes of the above modules, please refer to the corresponding contents disclosed in the above embodiments, which will not be repeated here.

[0069] Correspondingly, an embodiment of the present invention further discloses a component state timing prediction device, including a processor and a memory; wherein the processor implements the component state timing prediction method disclosed in the above embodiment when executing a computer program stored in the memory.

[0070] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0071] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the component state timing prediction method disclosed above is implemented.

[0072] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0073] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the devices, equipment, and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.

[0074] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0075] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0076] In summary, a component state timing prediction method provided by an embodiment of the present invention includes: obtaining a component state sequence data set, and converting all component state sequence data sets into a one-hot coding queue; taking the one-hot coding corresponding to the set time step as the input queue, and taking the one-hot coding corresponding to the next set time step as the output label value, establishing and training a sequence prediction model; taking the one-hot coding corresponding to the set number of component states as the input queue, and taking the time interval between the last component state and the next component state in the set number of component states as the output label value, establishing and training a time prediction model; superimposing the sequence prediction model and the time prediction model to obtain a timing prediction model; inputting the component state information to be tested into the timing prediction model, and outputting the one-hot coding and time interval prediction value corresponding to the component state that occurs next. The method establishes and trains a sequence prediction model and a time prediction model, and superimposes the sequence prediction model and the time prediction model to obtain a timing prediction model. The time prediction model can be used to output the component state and time interval that occur next according to the current component state, thereby realizing real-time prediction of the component state timing generated by the user calling the component, and the prediction result has high accuracy. In addition, the present invention also provides corresponding devices, equipment and computer-readable storage media for the component state timing prediction method, which further makes the above method more practical. The device, equipment and computer-readable storage medium have corresponding advantages.

[0077] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0078] The component state timing prediction method, device, equipment and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A component state timing prediction method, characterized in that: include: Obtain component state sequence data sets, and convert all of the component state sequence data sets into one-hot encoding queues; The one-hot encoding corresponding to the set time step is used as the input queue, and the one-hot encoding corresponding to the next set time step is used as the output label value to build and train the sequence prediction model; The one-hot encoding corresponding to the set number of component states is used as the input queue, and the time interval between the last component state and the next component state in the set number of component states is used as the output label value to establish and train a time prediction model; Superimposing the sequence prediction model and the time prediction model to obtain a time series prediction model; The state information of the component to be tested is input into the timing prediction model, and the one-hot encoding and time interval prediction value corresponding to the component state occurring next are output.

2. The component status timing prediction method according to claim 1, characterized in that: The sequence prediction model includes a first LSTM layer having 128 units, an activation function of hyperbolic tangent, and an input shape of a one-hot length corresponding to the set time step, and a first fully connected layer with an activation function of softmax and an output shape of a one-hot length corresponding to the set time step.

3. The component status timing prediction method according to claim 2, characterized in that: The time prediction model includes a second LSTM layer with 128 units, an activation function of hyperbolic tangent, an input shape of a one-hot length corresponding to the set number of component states, and a second fully connected layer with an output shape of 1.

4. The component status timing prediction method according to claim 3, characterized in that: The one-hot length corresponding to the set time step is the same as the one-hot length corresponding to the set number of component states.

5. The component status timing prediction method according to claim 1, characterized in that: The step of converting all component state sequence data sets into one-hot encoding queues includes: Obtain the names of all components in all the component state sequence data sets by a reverse method, and add a start state and an end state to each component respectively; According to the obtained name, the added start state and end state, all component states are encoded to obtain a one-hot encoding queue.

6. A component state timing prediction device, characterized in that: include: A coding queue conversion module, used for acquiring component state sequence data sets and converting all of the component state sequence data sets into one-hot coding queues; The sequence prediction model building module is used to take the one-hot encoding corresponding to the set time step as the input queue, and take the one-hot encoding corresponding to the next set time step as the output label value to build and train the sequence prediction model; A time prediction model building module is used to take the one-hot encoding corresponding to the set number of component states as an input queue, and take the time interval between the last component state and the next component state in the set number of component states as an output label value, to build and train a time prediction model; A model superposition module, used for superimposing the sequence prediction model and the time prediction model to obtain a time series prediction model; The timing prediction module is used to input the state information of the component to be tested into the timing prediction model, and output the one-hot code and time interval prediction value corresponding to the component state occurring next.

7. The component state timing prediction device according to claim 6, characterized in that: The sequence prediction model includes a first LSTM layer having 128 units, an activation function of hyperbolic tangent, and an input shape of a one-hot length corresponding to the set time step, and a first fully connected layer with an activation function of softmax and an output shape of a one-hot length corresponding to the set time step.

8. The component state timing prediction device according to claim 7, characterized in that: The time prediction model includes a second LSTM layer with 128 units, an activation function of hyperbolic tangent, an input shape of a one-hot length corresponding to the set number of component states, and a second fully connected layer with an output shape of 1.

9. A component state timing prediction device, characterized in that: The method comprises a processor and a memory, wherein the processor implements the component state timing prediction method according to any one of claims 1 to 5 when executing the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the component state timing prediction method according to any one of claims 1 to 5 is implemented.