What's the best architecture for time series prediction with a long dataset? I have to build a neural network without any architecture limitations which have to predict the next value of a time series.

The dataset is composed of 400.000 values, which are given in hex format. For example

0xbfb22b14
0xbfb22b10
0xbfb22b0c
0xbfb22b18
0xbfb22b14


I think LSTM is suitable for this problem, but I am worried about the length of the input. Would it be a good idea to use CNN?

def structure(step,n_features):
    # define model
    model = Sequential()
    model.add(LSTM(50, activation='relu', return_sequences=True, input_shape=(step, n_features)))
    model.add(Dense(1))
    model.compile(optimizer='adam', loss='mse')
    return model


What about this one ?

"model": {
        "loss": "mse",
        "optimizer": "adam",
    "save_dir": "saved_models",
        "layers": [
            {
                "type": "lstm",
                "neurons": 999,
                "input_timesteps": 998,
                "input_dim": 1,
                "return_seq": true
            },
            {
                "type": "dropout",
                "rate": 0.05
            },
            {
                "type": "lstm",
                "neurons": 100,
                "return_seq": false
            },
            {
                "type": "dropout",
                "rate": 0.05
            },
            {
                "type": "dense",
                "neurons": 1,
                "activation": "linear"
            }
Yes, LSTM are ideal for this. For even stronger representational capacity, make your LSTM's multi-layered.
Using 1-dimensional convolutions in a CNN is a common way to exctract information from time series too, so there's no harm in trying. Typically, you'll test many models out and take the one that has best validation performance.