The precision machine tool is essential for machining parts with high-precision requirements, and are widely used in the aviation, aerospace, and other fields. The thermal error is an important factor affecting the geometric precision of machined parts, and then its effective control is important. To enhance the control accuracy and execution efficiency, an edge-cloud system is designed to predict and control thermal errors. To obtain the thermal error data, a sensor network, which is composed of the temperature and displacement sensors, is designed for the thermal behavior measurement. Then the temporal and spatial behaviors of thermal errors are revealed from the heat transfer perspective, and a novel sequence-to-sequence model based LSTM network with attention mechanism (SQ-LSTMA) is designed with the full exploration of the long-term (LT) and short-term (ST) memory information of thermal errors. For the designed edge-cloud system framework, the data collection is conducted by the user layer. The edge layer performs the data processing, data storage, and error prediction with the real-time data, and the SQ-LSTMA model training is conducted by the cloud layer with the historical data. The results show that the execution time is shorten effectively and that the geometric precision of the machined part is increased. Additionally, the SQ-LSTMA model is able to reflect the dependence of the current thermal error on the historical thermal errors, and should have the ability to utilize the LT and ST memory information, and the robustness and prediction accuracy of SQ-LSTMA is superior to that of the traditional time-series models.