[go: up one dir, main page]

CN118171744B - Prediction method and device for spatiotemporal distribution, electronic device and storage medium - Google Patents

Prediction method and device for spatiotemporal distribution, electronic device and storage medium Download PDF

Info

Publication number
CN118171744B
CN118171744B CN202410587368.6A CN202410587368A CN118171744B CN 118171744 B CN118171744 B CN 118171744B CN 202410587368 A CN202410587368 A CN 202410587368A CN 118171744 B CN118171744 B CN 118171744B
Authority
CN
China
Prior art keywords
data
user
hidden state
activation
target user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410587368.6A
Other languages
Chinese (zh)
Other versions
CN118171744A (en
Inventor
徐勉昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202410587368.6A priority Critical patent/CN118171744B/en
Publication of CN118171744A publication Critical patent/CN118171744A/en
Application granted granted Critical
Publication of CN118171744B publication Critical patent/CN118171744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/046Forward inferencing; Production systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/042Backward inferencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/1396Protocols specially adapted for monitoring users' activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

According to the space-time distribution prediction method and device, the electronic equipment and the storage medium, original data are filtered to obtain target data, the target data are constructed to obtain a user stay state vector sequence, and the target data are converted to obtain a user data vector; inputting the user stay state vector sequence and the user data vector into a prediction model to carry out first calculation to obtain a first hidden state, and carrying out second calculation on the user stay state vector sequence and the user data vector by the prediction model to obtain a second hidden state; and obtaining a third hidden state according to the first hidden state and the second hidden state, and converting the third hidden state to obtain a distribution prediction result. Compared with the related art, the method and the device have the advantages that the vectors are input into the prediction model in the positive sequence and the negative sequence to conduct forward prediction and reverse prediction, and the two prediction results are converted into the final distribution prediction result, so that the accuracy of the prediction result of the user distribution is improved.

Description

时空分布的预测方法及装置、电子设备和存储介质Prediction method and device for spatiotemporal distribution, electronic device and storage medium

技术领域Technical Field

本公开涉及数据处理技术领域,尤其涉及一种时空分布的预测方法及装置、电子设备和存储介质。The present disclosure relates to the field of data processing technology, and in particular to a prediction method and device for spatiotemporal distribution, an electronic device, and a storage medium.

背景技术Background Art

随着科技的发展,云计算、大数据等新兴技术兴起,为各行各业带来了新的生机并衍生出各种各样的新型业务需求,云电脑作为电脑虚拟化的最终形态,是云计算催发下的产物,它可以将云电脑通过高速网络传输投射到任意设备上,例如:手机、平板、机顶盒等,因其便捷性、可用性迅速占领了商务办公、公众娱乐的市场,因此,基于深度学习领域去预测云电脑用户的时空分布,从而为云电脑产品向目标人群精准投放和使用场景推介,具有重要的理论意义和实践意义。With the development of science and technology, the rise of emerging technologies such as cloud computing and big data has brought new vitality to all walks of life and derived various new business needs. Cloud computers, as the final form of computer virtualization, are the product of cloud computing. They can project cloud computers onto any device through high-speed network transmission, such as mobile phones, tablets, set-top boxes, etc. Due to their convenience and availability, they have quickly occupied the market of business office and public entertainment. Therefore, it is of great theoretical and practical significance to predict the spatiotemporal distribution of cloud computer users based on the field of deep learning, so as to accurately deliver cloud computer products to the target population and promote usage scenarios.

然而,现有技术中的预测云电脑用户的时空分布的方法,对于数据的采集精度要求较高,且较多的关注移动用户的空间位置信息,导致最终用户分布的预测结果,准确性较低。However, the existing methods for predicting the spatiotemporal distribution of cloud computer users require high data collection accuracy and pay more attention to the spatial location information of mobile users, resulting in low accuracy in the prediction results of the final user distribution.

发明内容Summary of the invention

本公开提供了一种时空分布的预测方法、装置、电子设备和存储介质。其主要目的在于解决现有技术中的预测云电脑用户的时空分布的方法,对于数据的采集精度要求较高,且较多的关注移动用户的空间位置信息,导致最终用户分布的预测结果,准确性较低的问题。The present disclosure provides a method, device, electronic device and storage medium for predicting spatiotemporal distribution. The main purpose is to solve the problem that the existing method for predicting the spatiotemporal distribution of cloud computer users has high requirements for data collection accuracy and pays more attention to the spatial location information of mobile users, resulting in low accuracy of the prediction results of the final user distribution.

根据本公开的第一方面,提供了一种时空分布的预测方法,其中,包括:According to a first aspect of the present disclosure, a method for predicting spatiotemporal distribution is provided, comprising:

将采集的原始用户数据进行过滤处理,得到目标用户数据,并对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;Filtering the collected original user data to obtain target user data, performing data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and performing data conversion processing on the target user data to obtain a user data vector corresponding to the target user data;

将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;Inputting the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference process to obtain first hidden state data corresponding to the target user data, and performing a second inference process on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data;

根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果。The third hidden state data corresponding to the target user data is obtained according to the first hidden state data and the second hidden state data, and data conversion processing is performed on the third hidden state data to obtain a corresponding distribution prediction result.

可选的,所述对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列包括:Optionally, performing data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data includes:

根据所述目标用户数据中携带的空间数据信息以及时间数据信息,对所述目标用户数据进行数据转化,得到用户停留状态向量;According to the spatial data information and the temporal data information carried in the target user data, the target user data is converted into data to obtain a user stay state vector;

根据所述时间数据信息对所述用户停留状态向量进行数据排列,得到所述用户停留状态向量序列。The user stay state vectors are arranged according to the time data information to obtain the user stay state vector sequence.

可选的,所述对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量包括:Optionally, performing data conversion processing on the target user data to obtain a user data vector corresponding to the target user data includes:

将所述目标用户数据中的地理数据进行数据转换处理,得到地理数据向量;Performing data conversion processing on the geographic data in the target user data to obtain a geographic data vector;

通过预设数据转换算法对所述目标用户数据中的其他数据,进行数据转换处理,得到其他数据向量,其中,所述其他数据为所述目标用户数据中,除所述地理数据外的所有数据;Performing data conversion processing on other data in the target user data by using a preset data conversion algorithm to obtain other data vectors, wherein the other data is all data in the target user data except the geographic data;

将所述地理数据向量以及所述其他数据向量进行合并处理,得到所述用户数据向量。The geographic data vector and the other data vectors are combined to obtain the user data vector.

可选的,所述将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据包括:Optionally, the step of inputting the user stay state vector sequence and the user data vector into a pre-trained prediction model for first inference processing to obtain first hidden state data corresponding to the target user data includes:

通过第一预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第一激活输入数据,所述第一激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;Activate the user stay state vector sequence and the user data vector through a first preset activation function to obtain first activation input data, where the first activation input data includes the time data information, and the time data information at least includes time period information for generating the user data;

根据所述第一激活输入数据、第一历史隐藏状态数据以及第一权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一遗忘门数据,其中,所述第一历史隐藏状态数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第一权重系数和偏置值用于控制所述第一激活输入数据的数据遗忘程度;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and the first weight coefficient and the bias value, activation is performed through the first preset activation function to obtain first forget gate data, wherein the first historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period before the time period information, and the first weight coefficient and the bias value are used to control the data forgetting degree of the first activation input data;

根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第二权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输入门数据,所述第二权重系数和偏置值用于控制所述第一激活输入数据的新数据接受程度;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and the second weight coefficient and the bias value, activation is performed through the first preset activation function to obtain first input gate data, and the second weight coefficient and the bias value are used to control the new data acceptance degree of the first activation input data;

根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第三权重系数和偏置值进行数据计算处理之后,通过第二预设激活函数进行激活,得到第一候选记忆数据,所述第三权重系数和偏置值用于对所述第一激活输入数据进行数据调整;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and the third weight coefficient and the bias value, activation is performed through a second preset activation function to obtain first candidate memory data, and the third weight coefficient and the bias value are used to perform data adjustment on the first activation input data;

根据所述第一遗忘门数据、所述第一输入门数据、所述第一候选记忆数据以及第一历史更新记忆数据,进行数据计算处理,得到第一更新记忆数据,所述第一历史更新记忆数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的更新记忆数据;Performing data calculation processing according to the first forget gate data, the first input gate data, the first candidate memory data, and the first historical update memory data to obtain first update memory data, where the first historical update memory data is update memory data calculated according to user data generated in an adjacent time period before the time period information;

根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第四权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输出门数据,所述第四权重系数和偏置值用于控制所述第一激活输入数据的输出状态生成程度;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and a fourth weight coefficient and a bias value, activation is performed through the first preset activation function to obtain first output gate data, and the fourth weight coefficient and the bias value are used to control the degree of output state generation of the first activation input data;

根据所述第一更新记忆数据以及所述第一输出门数据进行数据计算处理,得到所述第一隐藏状态数据。Data calculation and processing are performed according to the first updated memory data and the first output gate data to obtain the first hidden state data.

可选的,所述基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据包括:Optionally, performing a second inference process on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data includes:

通过第三预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第二激活输入数据,所述第二激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;Activate the user stay state vector sequence and the user data vector by a third preset activation function to obtain second activation input data, where the second activation input data includes the time data information, and the time data information includes at least time period information for generating the user data;

根据所述第二激活输入数据、第二历史隐藏状态数据以及第五权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二遗忘门数据,其中,所述第二历史隐藏状态数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第五权重系数和偏置值用于控制所述第二激活输入数据的数据遗忘程度;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the fifth weight coefficient and the bias value, activation is performed through the third preset activation function to obtain second forget gate data, wherein the second historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period after the time period information, and the fifth weight coefficient and the bias value are used to control the data forgetting degree of the second activation input data;

根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第六权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输入门数据,所述第六权重系数和偏置值用于控制所述第二激活输入数据的新数据接受程度;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the sixth weight coefficient and the bias value, activation is performed through the third preset activation function to obtain second input gate data, and the sixth weight coefficient and the bias value are used to control the new data acceptance degree of the second activation input data;

根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第七权重系数和偏置值进行数据计算处理之后,通过第四预设激活函数进行激活,得到第二候选记忆数据,所述第七权重系数和偏置值用于对所述第二激活输入数据进行数据调整;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the seventh weight coefficient and the bias value, activation is performed through a fourth preset activation function to obtain second candidate memory data, and the seventh weight coefficient and the bias value are used to perform data adjustment on the second activation input data;

根据所述第二遗忘门数据、所述第二输入门数据、所述第二候选记忆数据以及第二历史更新记忆数据,进行数据计算处理,得到第二更新记忆数据,所述第二历史更新记忆数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的更新记忆数据;Performing data calculation processing according to the second forget gate data, the second input gate data, the second candidate memory data, and the second historical update memory data to obtain second update memory data, where the second historical update memory data is update memory data calculated according to user data generated in an adjacent time period after the time period information;

根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第八权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输出门数据,所述第八权重系数和偏置值用于控制所述第二激活输入数据的输出状态生成程度;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the eighth weight coefficient and the bias value, activation is performed through the third preset activation function to obtain second output gate data, and the eighth weight coefficient and the bias value are used to control the degree of output state generation of the second activation input data;

根据所述第二更新记忆数据以及所述第二输出门数据进行数据计算处理,得到所述第二隐藏状态数据。Data calculation processing is performed according to the second updated memory data and the second output gate data to obtain the second hidden state data.

可选的,所述对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果包括:Optionally, performing data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result includes:

将所述第三隐藏状态数据输入至预设全连接结构中进行全连接处理,得到全连接数据;Inputting the third hidden state data into a preset fully connected structure for full connection processing to obtain fully connected data;

通过第五预设激活函数对所述全连接数据进行数据激活处理,得到概率分布数据,并将所述概率分布数据作为所述分布预测结果。The fully connected data is subjected to data activation processing by using a fifth preset activation function to obtain probability distribution data, and the probability distribution data is used as the distribution prediction result.

根据本公开的第二方面,提供了一种时空分布的预测装置,包括:According to a second aspect of the present disclosure, there is provided a prediction device for spatiotemporal distribution, comprising:

过滤单元,用于将采集的原始用户数据进行过滤处理,得到目标用户数据;A filtering unit, used to filter the collected original user data to obtain target user data;

处理单元,用于对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;a processing unit, configured to perform data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and to perform data conversion processing on the target user data to obtain a user data vector corresponding to the target user data;

输入单元,用于将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;an input unit, configured to input the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference process to obtain first hidden state data corresponding to the target user data, and to perform a second inference process on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data;

转化单元,用于根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果。A conversion unit is used to obtain third hidden state data corresponding to the target user data according to the first hidden state data and the second hidden state data, and perform data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result.

可选的,所述处理单元包括:Optionally, the processing unit includes:

转化模块,用于根据所述目标用户数据中携带的空间数据信息以及时间数据信息,对所述目标用户数据进行数据转化,得到用户停留状态向量;A conversion module, configured to perform data conversion on the target user data according to the spatial data information and the temporal data information carried in the target user data, so as to obtain a user stay state vector;

排列模块,用于根据所述时间数据信息对所述用户停留状态向量进行数据排列,得到所述用户停留状态向量序列。The arrangement module is used to arrange the user stay state vector according to the time data information to obtain the user stay state vector sequence.

可选的,所述处理单元还包括:Optionally, the processing unit further includes:

转换模块,用于将所述目标用户数据中的地理数据进行数据转换处理,得到地理数据向量;A conversion module, used for performing data conversion processing on the geographic data in the target user data to obtain a geographic data vector;

所述转换模块还用于,通过预设数据转换算法对所述目标用户数据中的其他数据,进行数据转换处理,得到其他数据向量,其中,所述其他数据为所述目标用户数据中,除所述地理数据外的所有数据;The conversion module is further used to perform data conversion processing on other data in the target user data by using a preset data conversion algorithm to obtain other data vectors, wherein the other data is all data in the target user data except the geographic data;

合并模块,用于将所述地理数据向量以及所述其他数据向量进行合并处理,得到所述用户数据向量。The merging module is used to merge the geographic data vector and the other data vectors to obtain the user data vector.

可选的,所述输入单元包括:Optionally, the input unit includes:

第一激活模块,用于通过第一预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第一激活输入数据,所述第一激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;A first activation module, configured to activate the user stay state vector sequence and the user data vector by using a first preset activation function to obtain first activation input data, wherein the first activation input data includes the time data information, and the time data information includes at least time period information for generating the user data;

第一计算模块,用于根据所述第一激活输入数据、第一历史隐藏状态数据以及第一权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一遗忘门数据,其中,所述第一历史隐藏状态数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第一权重系数和偏置值用于控制所述第一激活输入数据的数据遗忘程度;A first calculation module, configured to perform data calculation processing according to the first activation input data, the first historical hidden state data, and the first weight coefficient and the bias value, and then activate the data through the first preset activation function to obtain first forget gate data, wherein the first historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period before the time period information, and the first weight coefficient and the bias value are used to control the data forgetting degree of the first activation input data;

所述第一计算模块还用于,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第二权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输入门数据,所述第二权重系数和偏置值用于控制所述第一激活输入数据的新数据接受程度;The first calculation module is further used to, after performing data calculation processing according to the first activation input data, the first historical hidden state data, and the second weight coefficient and the bias value, activate through the first preset activation function to obtain the first input gate data, and the second weight coefficient and the bias value are used to control the new data acceptance degree of the first activation input data;

所述第一计算模块还用于,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第三权重系数和偏置值进行数据计算处理之后,通过第二预设激活函数进行激活,得到第一候选记忆数据,所述第三权重系数和偏置值用于对所述第一激活输入数据进行数据调整;The first calculation module is further used to, after performing data calculation processing according to the first activation input data, the first historical hidden state data, and the third weight coefficient and the bias value, activate through a second preset activation function to obtain first candidate memory data, and the third weight coefficient and the bias value are used to perform data adjustment on the first activation input data;

所述第一计算模块还用于,根据所述第一遗忘门数据、所述第一输入门数据、所述第一候选记忆数据以及第一历史更新记忆数据,进行数据计算处理,得到第一更新记忆数据,所述第一历史更新记忆数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的更新记忆数据;The first calculation module is further used to perform data calculation processing according to the first forget gate data, the first input gate data, the first candidate memory data and the first historical update memory data to obtain first update memory data, where the first historical update memory data is update memory data calculated according to user data generated in an adjacent time period before the time period information;

所述第一计算模块还用于,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第四权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输出门数据,所述第四权重系数和偏置值用于控制所述第一激活输入数据的输出状态生成程度;The first calculation module is further used to, after performing data calculation processing according to the first activation input data, the first historical hidden state data, and a fourth weight coefficient and a bias value, activate through the first preset activation function to obtain first output gate data, and the fourth weight coefficient and the bias value are used to control the output state generation degree of the first activation input data;

所述第一计算模块还用于,根据所述第一更新记忆数据以及所述第一输出门数据进行数据计算处理,得到所述第一隐藏状态数据。The first calculation module is further used to perform data calculation processing according to the first updated memory data and the first output gate data to obtain the first hidden state data.

可选的,所述输入单元还包括:Optionally, the input unit further includes:

第二激活模块,用于通过第三预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第二激活输入数据,所述第二激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;A second activation module is used to activate the user stay state vector sequence and the user data vector through a third preset activation function to obtain second activation input data, where the second activation input data includes the time data information, and the time data information at least includes time period information for generating the user data;

第二计算模块,用于根据所述第二激活输入数据、第二历史隐藏状态数据以及第五权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二遗忘门数据,其中,所述第二历史隐藏状态数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第五权重系数和偏置值用于控制所述第二激活输入数据的数据遗忘程度;a second calculation module, configured to perform data calculation processing according to the second activation input data, the second historical hidden state data, and the fifth weight coefficient and the bias value, and then activate the data through the third preset activation function to obtain second forget gate data, wherein the second historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period after the time period information, and the fifth weight coefficient and the bias value are used to control the data forgetting degree of the second activation input data;

所述第二计算模块还用于,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第六权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输入门数据,所述第六权重系数和偏置值用于控制所述第二激活输入数据的新数据接受程度;The second calculation module is further used to, after performing data calculation processing according to the second activation input data, the second historical hidden state data, and the sixth weight coefficient and the bias value, activate through the third preset activation function to obtain second input gate data, and the sixth weight coefficient and the bias value are used to control the new data acceptance degree of the second activation input data;

所述第二计算模块还用于,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第七权重系数和偏置值进行数据计算处理之后,通过第四预设激活函数进行激活,得到第二候选记忆数据,所述第七权重系数和偏置值用于对所述第二激活输入数据进行数据调整;The second calculation module is further used to, after performing data calculation processing according to the second activation input data, the second historical hidden state data, and the seventh weight coefficient and the bias value, activate through a fourth preset activation function to obtain second candidate memory data, and the seventh weight coefficient and the bias value are used to perform data adjustment on the second activation input data;

所述第二计算模块还用于,根据所述第二遗忘门数据、所述第二输入门数据、所述第二候选记忆数据以及第二历史更新记忆数据,进行数据计算处理,得到第二更新记忆数据,所述第二历史更新记忆数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的更新记忆数据;The second calculation module is further used to perform data calculation processing according to the second forget gate data, the second input gate data, the second candidate memory data and the second historical update memory data to obtain second update memory data, where the second historical update memory data is update memory data calculated according to user data generated in an adjacent time period after the time period information;

所述第二计算模块还用于,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第八权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输出门数据,所述第八权重系数和偏置值用于控制所述第二激活输入数据的输出状态生成程度;The second calculation module is further used to, after performing data calculation processing according to the second activation input data, the second historical hidden state data, and the eighth weight coefficient and the bias value, activate through the third preset activation function to obtain second output gate data, and the eighth weight coefficient and the bias value are used to control the output state generation degree of the second activation input data;

所述第二计算模块还用于,根据所述第二更新记忆数据以及所述第二输出门数据进行数据计算处理,得到所述第二隐藏状态数据。The second calculation module is further used to perform data calculation processing according to the second updated memory data and the second output gate data to obtain the second hidden state data.

可选的,所述转化单元包括:Optionally, the conversion unit comprises:

处理模块,用于将所述第三隐藏状态数据输入至预设全连接结构中进行全连接处理,得到全连接数据;A processing module, used for inputting the third hidden state data into a preset fully connected structure for performing fully connected processing to obtain fully connected data;

激活模块,用于通过第五预设激活函数对所述全连接数据进行数据激活处理,得到概率分布数据,并将所述概率分布数据作为所述分布预测结果。An activation module is used to perform data activation processing on the fully connected data through a fifth preset activation function to obtain probability distribution data, and use the probability distribution data as the distribution prediction result.

根据本公开的第三方面,提供了一种电子设备,包括:According to a third aspect of the present disclosure, there is provided an electronic device, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面所述的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

根据本公开的第四方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行前述第一方面所述的方法。According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

根据本公开的第五方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如前述第一方面所述的方法。According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

本公开提供的时空分布的预测方法及装置、电子设备和存储介质,将采集的原始用户数据进行过滤处理,得到目标用户数据,并对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果。与相关技术相比,本公开实施例通过将用户数据转化为向量,将转化后的向量以正序和逆序的方式输入至预测模型进行正向推算和反向推算处理,并将两个推算结果转化为最终分布预测结果,可以无需高精度的用户数据,且同时关注了用户的空间位置信息以及时间特征信息,提高了用户分布的预测结果的准确性。The prediction method and device for spatiotemporal distribution, electronic device and storage medium provided by the present disclosure filter the collected original user data to obtain target user data, perform data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and perform data conversion processing on the target user data to obtain a user data vector corresponding to the target user data; input the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference processing to obtain first hidden state data corresponding to the target user data, and perform a second inference processing on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data; obtain third hidden state data corresponding to the target user data based on the first hidden state data and the second hidden state data, and perform data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result. Compared with the related art, the embodiment of the present disclosure converts user data into vectors, inputs the converted vectors into the prediction model in forward and reverse order for forward and reverse calculation processing, and converts the two calculation results into final distribution prediction results. It does not require high-precision user data and pays attention to the user's spatial location information and time feature information at the same time, thereby improving the accuracy of the prediction results of user distribution.

应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

图1为本公开实施例所提供的一种时空分布的预测方法的流程示意图;FIG1 is a schematic flow chart of a method for predicting spatiotemporal distribution provided by an embodiment of the present disclosure;

图2为本公开实施例所提供的一种时空分布的预测方法的原理示意图;FIG2 is a schematic diagram showing the principle of a method for predicting spatiotemporal distribution provided by an embodiment of the present disclosure;

图3为本公开实施例所提供的一种用户停留状态向量序列的构建流程示意图;FIG3 is a schematic diagram of a process for constructing a user stay state vector sequence provided by an embodiment of the present disclosure;

图4为本公开实施例所提供的一种用户数据向量的转换流程示意图;FIG4 is a schematic diagram of a conversion process of a user data vector provided by an embodiment of the present disclosure;

图5为本公开实施例所提供的一种第一推算处理的流程示意图;FIG5 is a schematic diagram of a flow chart of a first inference process provided by an embodiment of the present disclosure;

图6为本公开实施例所提供的一种第二推算处理的流程示意图;FIG6 is a schematic diagram of a flow chart of a second inference process provided by an embodiment of the present disclosure;

图7为本公开实施例所提供的一种时空分布的预测装置的结构示意图;FIG7 is a schematic diagram of the structure of a prediction device for spatiotemporal distribution provided by an embodiment of the present disclosure;

图8为本公开实施例所提供的另一种时空分布的预测装置的结构示意图;FIG8 is a schematic diagram of the structure of another device for predicting spatiotemporal distribution provided by an embodiment of the present disclosure;

图9为本公开实施例所提供的一种电子设备的示意性框图。FIG. 9 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure.

具体实施方式DETAILED DESCRIPTION

以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

下面参考附图描述本公开实施例的时空分布的预测方法及装置、电子设备和存储介质。The following describes the spatiotemporal distribution prediction method and device, electronic device, and storage medium according to embodiments of the present disclosure with reference to the accompanying drawings.

图1为本公开实施例所提供的一种时空分布的预测方法的流程示意图。FIG1 is a schematic flow chart of a method for predicting spatiotemporal distribution provided in an embodiment of the present disclosure.

如图1所示,该方法包含以下步骤:As shown in Figure 1, the method includes the following steps:

步骤101,将采集的原始用户数据进行过滤处理,得到目标用户数据,并对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量。Step 101, filtering the collected original user data to obtain target user data, performing data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and performing data conversion processing on the target user data to obtain a user data vector corresponding to the target user data.

在本公开实施例中,所述原始用户数据为从数据库中采集的云电脑用户数据,包含但不限于:云电脑用户总数、云电脑用户空间信息、时间信息、语义信息、用户唯一ID、地理数据等。对原始用户数据进行过滤的方式包含但不限于:滤波器及阈值判定等,此外,还可以通过自定义设置过滤条件的滤波器进行过滤,对原始用户数据进行过滤的主要目的是:清除噪声数据、冗余数据、重复数据等无效数据,关于阈值判定,例如:设置的阈值条件为用户使用云电脑的时间,阈值为30分钟,在对原始用户数据进行过滤时,便会过滤掉使用云电脑的时间小于30分钟的用户数据。In the disclosed embodiment, the original user data is the cloud computer user data collected from the database, including but not limited to: the total number of cloud computer users, cloud computer user spatial information, time information, semantic information, user unique ID, geographic data, etc. The way to filter the original user data includes but is not limited to: filters and threshold determination, etc. In addition, it can also be filtered by a filter with customized filter conditions. The main purpose of filtering the original user data is to remove invalid data such as noise data, redundant data, and duplicate data. Regarding threshold determination, for example, the threshold condition set is the time the user uses the cloud computer, and the threshold is 30 minutes. When filtering the original user data, the user data of the time the cloud computer is used for less than 30 minutes will be filtered out.

在对目标用户数据进行用户停留状态向量序列的构建处理时,会根据目标用户数据内包含的各种数据进行空间维度的映射,并附带时间属性,得到包含用户的时间与空间特征的用户停留状态向量序列;在对目标用户数据进行用户数据向量的转换处理时,是将原始用户数据中的每个数据分别进行转换,得到每个数据对应的向量数据,再根据每个数据对应的向量数据共同构建所述用户数据向量。When constructing the user stay state vector sequence of the target user data, the spatial dimension will be mapped according to the various data contained in the target user data, and the time attribute will be attached to obtain the user stay state vector sequence containing the user's time and space characteristics; when converting the target user data into a user data vector, each data in the original user data is converted separately to obtain the vector data corresponding to each data, and then the user data vector is jointly constructed according to the vector data corresponding to each data.

步骤102,将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据。Step 102: Input the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference processing to obtain first hidden state data corresponding to the target user data; and perform a second inference processing on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data.

在本公开实施例中,所述预先训练好的预测模型的结构包含但不限于:(DeepRecurrent Neural Network,DRNN)深度循环神经网络、双向长短期神经网络(Bi-LongShort Term Memory,Bi-LSTM)双向长短期神经网络等,在通过预测模型对用户停留状态向量序列与用户数据向量进行推算处理时,是在预测模型的Bi-LSTM结构中进行推算处理的,且需要对用户停留状态向量序列与用户数据向量,进行正向长短期记忆网络神经元推算以及反向长短期记忆网络神经元推算。In the disclosed embodiment, the structure of the pre-trained prediction model includes but is not limited to: Deep Recurrent Neural Network (DRNN), Bi-Long Short Term Memory (Bi-LSTM), etc. When the user stay state vector sequence and the user data vector are inferred by the prediction model, the inference is performed in the Bi-LSTM structure of the prediction model, and it is necessary to perform forward long short-term memory network neuron inference and reverse long short-term memory network neuron inference on the user stay state vector sequence and the user data vector.

其中,在进行正向长短期记忆网络神经元推算时,是将用户停留状态向量序列与用户数据向量以正序输入的方式输入至Bi-LSTM结构中的,在进行反向长短期记忆网络神经元推算时,是将用户停留状态向量序列与用户数据向量以反序输入的方式输入至Bi-LSTM结构中的,所述正序输入为根据时间的顺序将用户停留状态向量序列与用户数据向量输入,所述反序输入为根据与时间相反的顺序将用户停留状态向量序列与用户数据向量输入,例如:用户停留状态向量序列与用户数据向量由用户在8:00-12:00之间的目标用户数据转化的,正序输入便是将用户停留状态向量序列与用户数据向量按照8:00-12:00的顺序进行输入,反序输入便是将用户停留状态向量序列与用户数据向量按照12:00-8:00的顺序进行输入。同时,进行正向长短期记忆网络神经元推算以及反向长短期记忆网络神经元推算的先后顺序无明确限定,例如:可以先进行正向长短期记忆网络神经元推算,再进行反向长短期记忆网络神经元推算;可以先进行反向长短期记忆网络神经元推算,再进行正向长短期记忆网络神经元推算;也可以同时进行正向长短期记忆网络神经元推算以及反向长短期记忆网络神经元推算。具体的,本公开实施例不进行限制,Among them, when performing forward long short-term memory network neuron extrapolation, the user stay state vector sequence and the user data vector are input into the Bi-LSTM structure in a forward order input manner, and when performing reverse long short-term memory network neuron extrapolation, the user stay state vector sequence and the user data vector are input into the Bi-LSTM structure in a reverse order input manner. The forward order input is to input the user stay state vector sequence and the user data vector according to the order of time, and the reverse order input is to input the user stay state vector sequence and the user data vector according to the order opposite to the time. For example, the user stay state vector sequence and the user data vector are converted from the target user data between 8:00-12:00. The forward order input is to input the user stay state vector sequence and the user data vector in the order of 8:00-12:00, and the reverse order input is to input the user stay state vector sequence and the user data vector in the order of 12:00-8:00. At the same time, there is no clear limitation on the order of performing forward long short-term memory network neuron extrapolation and reverse long short-term memory network neuron extrapolation. For example, forward long short-term memory network neuron extrapolation can be performed first, and then reverse long short-term memory network neuron extrapolation can be performed; reverse long short-term memory network neuron extrapolation can be performed first, and then forward long short-term memory network neuron extrapolation can be performed; forward long short-term memory network neuron extrapolation and reverse long short-term memory network neuron extrapolation can also be performed simultaneously. Specifically, the embodiments of the present disclosure are not limited.

进一步的,为了便于对本公开实施例的理解,在后续实施例中,以第一推算处理表示正向长短期记忆网络神经元推算、第二推算处理表示反向长短期记忆网络神经元推算为例进行说明。Furthermore, in order to facilitate the understanding of the embodiments of the present disclosure, in the subsequent embodiments, the first inference processing represents the forward long short-term memory network neuron inference and the second inference processing represents the reverse long short-term memory network neuron inference.

步骤103,根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果。Step 103: Obtain third hidden state data corresponding to the target user data according to the first hidden state data and the second hidden state data, and perform data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result.

在本公开实施例中,第三隐藏状态数据的表现形式包含但不限于:向量形式、矩阵形式等,所述第三隐藏状态数据为通过第一隐藏状态数据以及第二隐藏状态数据进行数据合并得到的,即所述第三隐藏状态数据为将正向LSTM的隐藏状态和反向LSTM的隐藏状态进行状态连接,得到双向LSTM的隐藏状态,关于第三隐藏状态数据,可以通过公式(1)进行获取:In the embodiment of the present disclosure, the third hidden state data may be expressed in a form including but not limited to a vector form, a matrix form, etc. The third hidden state data is obtained by merging the first hidden state data and the second hidden state data, that is, the third hidden state data is obtained by connecting the hidden state of the forward LSTM and the hidden state of the reverse LSTM to obtain the hidden state of the bidirectional LSTM. The third hidden state data may be obtained by formula (1):

公式(1) Formula (1)

其中,为所述第三隐藏状态数据,为所述第一隐藏状态数据,为所述第二隐藏状态数据。in, is the third hidden state data, is the first hidden state data, is the second hidden state data.

由于所述第三隐藏状态数据是通过向量、矩阵等形式进行表示的,因此,需要将所述第三隐藏数据进行数据转化之后,才可得到所述分布预测结果。Since the third hidden state data is represented in the form of a vector, a matrix, etc., the third hidden data needs to be converted before the distribution prediction result can be obtained.

具体的,关于为了便于理解本公开实施例的实现过程,提供了一种时空分布的预测方法的原理示意图,如图2所示,其中,数据层为对原始用户数据进行过滤处理的操作过程,用户停留状态向量序列以及用户数据向量都需经过转换层的转换之后才可以得到,模型训练层为所述预测模型对用户停留状态向量序列以及用户数据向量进行处理的操作过程,结果层为得到的分布预测结果。Specifically, in order to facilitate understanding of the implementation process of the embodiment of the present disclosure, a principle schematic diagram of a spatiotemporal distribution prediction method is provided, as shown in Figure 2, wherein the data layer is an operation process of filtering the original user data, and the user stay state vector sequence and the user data vector must be converted by the conversion layer before they can be obtained. The model training layer is an operation process of the prediction model processing the user stay state vector sequence and the user data vector, and the result layer is the obtained distribution prediction result.

本公开提供的时空分布的预测方法,将采集的原始用户数据进行过滤处理,得到目标用户数据,并对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果。与相关技术相比,本公开实施例通过将用户数据转化为向量,将转化后的向量以正序和逆序的方式输入至预测模型进行正向推算和反向推算处理,并将两个推算结果转化为最终分布预测结果,可以无需高精度的用户数据,且同时关注了用户的空间位置信息以及时间特征信息,提高了用户分布的预测结果的准确性。The present disclosure provides a method for predicting spatiotemporal distribution, which filters the collected original user data to obtain target user data, performs data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and performs data conversion processing on the target user data to obtain a user data vector corresponding to the target user data; inputs the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference processing to obtain first hidden state data corresponding to the target user data, and performs a second inference processing on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data; obtains third hidden state data corresponding to the target user data based on the first hidden state data and the second hidden state data, and performs data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result. Compared with the related art, the embodiment of the present disclosure converts user data into vectors, inputs the converted vectors into the prediction model in forward and reverse order for forward and reverse calculation processing, and converts the two calculation results into final distribution prediction results. It does not require high-precision user data and pays attention to the user's spatial location information and time feature information at the same time, thereby improving the accuracy of the prediction results of user distribution.

在本公开实施例的一种可实现方式中,作为上述步骤101的细化,关于用户停留状态向量序列的构建,本公开实施例提供了一种用户停留状态向量序列的构建流程示意图,如图3所示,包括:In one possible implementation of the embodiment of the present disclosure, as a refinement of the above step 101, regarding the construction of the user stay state vector sequence, the embodiment of the present disclosure provides a schematic diagram of the construction process of the user stay state vector sequence, as shown in FIG3, including:

步骤301,根据所述目标用户数据中携带的空间数据信息以及时间数据信息,对所述目标用户数据进行数据转化,得到用户停留状态向量。Step 301: Perform data conversion on the target user data according to the spatial data information and time data information carried in the target user data to obtain a user stay state vector.

在本公开实施例中,需根据所述目标用户数据中携带的空间数据信息,将所述目标用户数据映射到空间维度,同时根据所述时间数据信息对映射后的目标用户数据附加时间属性,从而转化成用户的单个轨迹点,并以向量表示,得到所述用户停留状态向量。In the embodiment of the present disclosure, it is necessary to map the target user data to the spatial dimension according to the spatial data information carried in the target user data, and at the same time add a time attribute to the mapped target user data according to the time data information, thereby converting it into a single trajectory point of the user and expressing it as a vector to obtain the user's stay state vector.

其中,所述空间数据信息包含但不限于:用户登录云电脑时的位置、用户在使用云电脑时的移动轨迹等,所述时间数据信息包含但不限于:生成所述用户数据的时间段信息、用户登录云电脑时的时间信息、用户在使用云电脑时的时间信息、当前时间信息等,具体的,关于所述空间数据信息以及所述时间数据信息的内容,本公开实施例不进行限制。Among them, the spatial data information includes but is not limited to: the location of the user when logging into the cloud computer, the movement trajectory of the user when using the cloud computer, etc., and the time data information includes but is not limited to: the time period information for generating the user data, the time information when the user logs into the cloud computer, the time information when the user uses the cloud computer, the current time information, etc. Specifically, the present disclosed embodiment does not limit the content of the spatial data information and the time data information.

步骤302,根据所述时间数据信息对所述用户停留状态向量进行数据排列,得到所述用户停留状态向量序列。Step 302: Arrange the user stay state vectors according to the time data information to obtain the user stay state vector sequence.

在本公开实施例中,用户停留状态向量可以表示用户在某一时间所处的位置,所述用户停留状态向量序列是根据时间将对应的用户停留状态向量排列后得到的数据,例如:目标用户数据为8:00-12:00的数据,用户停留状态向量为8:00-12:00之内每个预设时间段对应的用户的单位置,所述预设时间段为自定义设置的(如:10秒、1分钟等),用户停留状态向量的排列便是按照时间顺序将8:00-12:00之内的用户停留状态向量排列起来,得到用户停留状态向量序列,所述用户停留状态向量序列可以表示包含有空间和时间信息的用户的单个轨迹点。In an embodiment of the present disclosure, a user stay state vector may represent a user's location at a certain time, and the user stay state vector sequence is data obtained by arranging corresponding user stay state vectors according to time. For example, the target user data is data from 8:00 to 12:00, and the user stay state vector is a single position of the user corresponding to each preset time period from 8:00 to 12:00, and the preset time period is a custom setting (such as 10 seconds, 1 minute, etc.). The arrangement of the user stay state vector is to arrange the user stay state vectors within 8:00 to 12:00 in chronological order to obtain a user stay state vector sequence, and the user stay state vector sequence may represent a single trajectory point of the user containing space and time information.

在本公开实施例的一种可实现方式中,作为上述步骤101的细化,关于用户数据向量的转换,本公开实施例提供了一种用户数据向量的转换流程示意图,如图4所示,包括:In an implementable manner of the embodiment of the present disclosure, as a refinement of the above step 101, regarding the conversion of the user data vector, the embodiment of the present disclosure provides a schematic diagram of the conversion process of the user data vector, as shown in FIG4, including:

步骤401,将所述目标用户数据中的地理数据进行数据转换处理,得到地理数据向量。Step 401: Perform data conversion processing on the geographic data in the target user data to obtain a geographic data vector.

在本公开实施例中,由于地理数据包含但不限于:栅格数据、距离间隔等自带空间信息的矢量数据等,用于表示地理位置的数据,因此,所述地理数据可以直接进行数据转换,得到对应的地理数据向量,所述地理数据向量包含但不限于:栅格地理指标数据向量、距离间隔数据向量等,地理数据向量可以用于表示用户所处的地理位置的信息。In the embodiments of the present disclosure, since geographic data includes but is not limited to: raster data, vector data with built-in spatial information such as distance intervals, etc., which are data used to represent geographic location, the geographic data can be directly converted to obtain corresponding geographic data vectors. The geographic data vectors include but are not limited to: raster geographic indicator data vectors, distance interval data vectors, etc. The geographic data vectors can be used to represent information about the user's geographic location.

步骤402,通过预设数据转换算法对所述目标用户数据中的其他数据,进行数据转换处理,得到其他数据向量,其中,所述其他数据为所述目标用户数据中,除所述地理数据外的所有数据。Step 402: Perform data conversion processing on other data in the target user data by using a preset data conversion algorithm to obtain other data vectors, wherein the other data is all data in the target user data except the geographic data.

在本公开实施例中,所述预设数据转换算法为自定义设置的一种转换算法,例如:基于自然语言处理技术的改进的GloVe方法等,所述其他数据包含但不限于:云电脑用户总数、云电脑用户空间信息、时间信息、语义信息、用户唯一ID等,具体的,关于所述预设数据转换算法以及所述其他数据的内容,本公开实施例不进行限制。In the embodiments of the present disclosure, the preset data conversion algorithm is a conversion algorithm with custom settings, for example: an improved GloVe method based on natural language processing technology, etc. The other data include but are not limited to: the total number of cloud computer users, cloud computer user spatial information, time information, semantic information, user unique ID, etc. Specifically, the embodiments of the present disclosure do not limit the content of the preset data conversion algorithm and the other data.

由于所述目标用户中的其他数据,例如:时间信息、语义信息、用户唯一ID等,为非矢量数据,无法直接转换为向量数据,因此,需要用预设数据转换算法进行转换,关于转换过程,例如:过基于自然语言处理技术的改进的GloVe方法分别将时间信息、用户唯一ID、语义信息等非矢量数据,通过共现矩阵、奇异值分解、语义加权、主成分分析等过程对应的时间信息向量、用户唯一ID向量、语音信息向量等,所述其他数据向量包含但不限于:时间信息向量、用户唯一ID向量、语音信息向量等。Since other data in the target user, such as time information, semantic information, user unique ID, etc., are non-vector data and cannot be directly converted into vector data, it is necessary to use a preset data conversion algorithm for conversion. Regarding the conversion process, for example, the improved GloVe method based on natural language processing technology is used to convert non-vector data such as time information, user unique ID, semantic information, etc., through co-occurrence matrix, singular value decomposition, semantic weighting, principal component analysis and other processes to corresponding time information vectors, user unique ID vectors, voice information vectors, etc. The other data vectors include but are not limited to: time information vectors, user unique ID vectors, voice information vectors, etc.

步骤403,将所述地理数据向量以及所述其他数据向量进行合并处理,得到所述用户数据向量。Step 403: merge the geographic data vector and the other data vectors to obtain the user data vector.

在本公开实施例中,地理数据向量以及其他数据向量的合并处理是指,将地理数据向量内的所有向量以及其他数据向量内的所有向量都进行合并,得到所述用户数据向量,用户数据向量表示目标用户数据中,所有数据对应的向量的集合。In the embodiment of the present disclosure, the merging process of the geographic data vector and other data vectors refers to merging all vectors in the geographic data vector and all vectors in the other data vectors to obtain the user data vector, where the user data vector represents a set of vectors corresponding to all data in the target user data.

在本公开实施例的一种可实现方式中,作为上述步骤102的细化,关于所述用户停留状态向量序列与所述用户数据向量的第一推算处理,本公开实施例提供了一种第一推算处理的流程示意图,如图5所示,包括:In an implementable manner of an embodiment of the present disclosure, as a refinement of the above step 102, regarding the first inference processing of the user stay state vector sequence and the user data vector, an embodiment of the present disclosure provides a flow chart of a first inference processing, as shown in FIG5 , including:

步骤501,通过第一预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第一激活输入数据,所述第一激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息。Step 501, activate the user stay state vector sequence and the user data vector through a first preset activation function to obtain first activation input data, wherein the first activation input data includes the time data information, and the time data information at least includes the time period information for generating the user data.

在本公开实施例中,需先将所述用户停留状态向量序列与所述用户数据向量进行合并,得到输入数据,所述输入向量可以表示用户当前时间数据信息内的时空位置状态,输入数据的表现形式包含但不限于:向量形式、矩阵形式等,关于所述输入数据,可以表示为:,其中,表示输入数据,表示当前时间步,即所述时间数据信息,表示用户在当前时间步的停留点位置,即所述时间数据信息内,用户的位置信息。In the embodiment of the present disclosure, the user stay state vector sequence and the user data vector need to be merged first to obtain input data. The input vector can represent the spatiotemporal position state in the user's current time data information. The input data may be expressed in a form including but not limited to a vector form, a matrix form, etc. The input data may be expressed as: ,in, Represents input data, represents the current time step, that is, the time data information, It indicates the location of the user's stay point at the current time step, that is, the user's location information in the time data information.

所述第一预设激活函数为自定义选择的一种激活函数,例如:Sigmoid函数等,具体的,关于所述第一预设激活函数,本公开实施例不进行限制。The first preset activation function is a custom-selected activation function, such as a Sigmoid function, etc. Specifically, the embodiment of the present disclosure does not limit the first preset activation function.

为了便于理解,后续第一预设激活函数以Sigmoid函数为例进行说明,具体的,关于Sigmoid函数可以用公式(2)表示:For ease of understanding, the first preset activation function is described below using the Sigmoid function as an example. Specifically, the Sigmoid function can be expressed by formula (2):

公式(2) Formula (2)

此时,所述第一激活输入数据可以表示为At this time, the first activation input data can be expressed as .

步骤502,根据所述第一激活输入数据、第一历史隐藏状态数据以及第一权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一遗忘门数据,其中,所述第一历史隐藏状态数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第一权重系数和偏置值用于控制所述第一激活输入数据的数据遗忘程度。Step 502, after data calculation and processing is performed according to the first activation input data, the first historical hidden state data, the first weight coefficient and the bias value, activation is performed through the first preset activation function to obtain the first forgetting gate data, wherein the first historical hidden state data is the hidden state data calculated according to the user data generated in the adjacent time period before the time period information, and the first weight coefficient and the bias value are used to control the data forgetting degree of the first activation input data.

在本公开实施例中,所述第一遗忘门数据为所述第一激活输入数据经过正向遗忘门计算之后,得到的正向遗忘门状态,所述正向遗忘门决定了所述第一激活输入数据中,何种数据应该从第一激活输入数据中被丢弃或保留,通过正向遗忘门查看上一个隐藏状态和当前的第一激活输入数据,并输出一个介于0到1之间的数值标记给第一激活输入数据中的每个数据。1代表“完全保留此数据”,而0代表“完全丢弃此数据”。如果正向遗忘门的输出为1,那么第一激活输入数据中的相应数据会保持不变;如果输出为0,那么相应数据会被遗忘,如果输出介于0到1之间,那么根据输出值对相应的数据进行调整(保留数据一部分)。In the disclosed embodiment, the first forget gate data is the forward forget gate state obtained after the first activation input data is calculated by the forward forget gate. The forward forget gate determines which data in the first activation input data should be discarded or retained from the first activation input data. The previous hidden state and the current first activation input data are checked through the forward forget gate, and a numerical value between 0 and 1 is output to each data in the first activation input data. 1 represents "completely retain this data", and 0 represents "completely discard this data". If the output of the forward forget gate is 1, the corresponding data in the first activation input data will remain unchanged; if the output is 0, the corresponding data will be forgotten, and if the output is between 0 and 1, the corresponding data will be adjusted according to the output value (retain part of the data).

具体的,关于第一遗忘门数据的计算过程,可以采用但不局限于公式(3)进行:Specifically, the calculation process of the first forget gate data can be performed using but not limited to formula (3):

公式(3) Formula (3)

其中,表示正向遗忘门状态即所述第一遗忘门数据,表示t-1时刻的正向隐层状态值即所述第一历史隐藏状态数据,分别表示正向遗忘门的权重系数和偏置值即第一权重系数和偏置值。in, represents the forward forget gate state, i.e., the first forget gate data, represents the forward hidden layer state value at time t-1, i.e., the first historical hidden state data, and They respectively represent the weight coefficient and bias value of the forward forget gate, namely the first weight coefficient and bias value.

需要说明的是,所述第一权重系数和偏置值为可训练数据,初始第一权重系数和偏置值为随机生成的数据,并且会随着预测模型的训练,同步的训练所述第一权重系数和偏置值,因此,在所述预先训练好的预测模型中,所述第一权重系数和偏置值也为训练好的数据,可以直接调用进行使用。It should be noted that the first weight coefficient and bias value are trainable data, and the initial first weight coefficient and bias value are randomly generated data, and the first weight coefficient and bias value will be trained synchronously with the training of the prediction model. Therefore, in the pre-trained prediction model, the first weight coefficient and bias value are also trained data and can be directly called for use.

步骤503,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第二权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输入门数据,所述第二权重系数和偏置值用于控制所述第一激活输入数据的新数据接受程度。Step 503, after data calculation and processing according to the first activation input data, the first historical hidden state data, and the second weight coefficient and bias value, activation is performed through the first preset activation function to obtain the first input gate data, and the second weight coefficient and bias value are used to control the degree of acceptance of new data of the first activation input data.

在本公开实施例中,所述第一输入门数据为所述第一激活输入数据经过正向输入门计算后,得到的正向输入门状态,所述正向输入门负责更新隐藏状态,并决定何种新数据将被存储。具体的,关于第一输入门数据的计算过程,可以采用但不局限于公式(4)进行:In the disclosed embodiment, the first input gate data is the forward input gate state obtained after the first activation input data is calculated by the forward input gate. The forward input gate is responsible for updating the hidden state and determining what new data will be stored. Specifically, the calculation process of the first input gate data can be performed using, but not limited to, formula (4):

公式(4) Formula (4)

其中,表示正向输入门状态即所述第一输入门数据,表示正向输入门的权重系数和偏置值即所述第二权重系数和偏置值。in, represents the state of the forward input gate, i.e., the first input gate data, and The weight coefficient and bias value representing the forward input gate are the second weight coefficient and bias value.

关于所述第二权重系数和偏置值可以参阅上述步骤502中,关于第一权重系数和偏置值的说明,故在此不再一一赘述。For the second weight coefficient and the bias value, please refer to the description of the first weight coefficient and the bias value in the above step 502, so they will not be repeated here.

步骤504,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第三权重系数和偏置值进行数据计算处理之后,通过第二预设激活函数进行激活,得到第一候选记忆数据,所述第三权重系数和偏置值用于对所述第一激活输入数据进行数据调整。Step 504, after data calculation and processing are performed based on the first activation input data, the first historical hidden state data, and the third weight coefficient and bias value, activation is performed through a second preset activation function to obtain first candidate memory data, and the third weight coefficient and bias value are used to perform data adjustment on the first activation input data.

在本公开实施例中,所述第一候选记忆数据为所述第一激活输入数据经过正向候选记忆单元计算后,得到的正向候选记忆单元状态,所述正向候选单元为在对第一激活输入更新之前,生成的一个候选值,此候选值包含了更新用状态信息,但此更新用状态信息未被LSTM的门控制器所确认,此候选值随后会通过正向输入门和正向遗忘门的组合来决定是否真正更新所述第一激活输入数据,正向候选记忆单元是一个向量,其元素是从上一个隐藏状态到当前时间步长的输入之间的乘积。In the disclosed embodiment, the first candidate memory data is the state of the positive candidate memory unit obtained after the first activation input data is calculated by the forward candidate memory unit. The positive candidate unit is a candidate value generated before the first activation input is updated. This candidate value contains state information for updating, but this state information for updating has not been confirmed by the gate controller of the LSTM. This candidate value will then be determined by a combination of the forward input gate and the forward forget gate to determine whether to actually update the first activation input data. The positive candidate memory unit is a vector whose elements are the product of the inputs from the previous hidden state to the current time step.

所述第二预设激活函数为自定义选择的一个激活函数,例如:tanh函数等,具体的,关于所述第二预设激活函数,本公开实施例不进行限制。The second preset activation function is a custom-selected activation function, such as a tanh function, etc. Specifically, the embodiment of the present disclosure does not limit the second preset activation function.

具体的,关于第一候选记忆数据的计算过程,可以采用但不局限于公式(5)进行:Specifically, the calculation process of the first candidate memory data may be performed using, but not limited to, formula (5):

公式(5) Formula (5)

其中,表示正向候选记忆单元状态即所述第一候选记忆数据,表示正向候选记忆单元的权重系数和偏置值即所述第三权重系数和偏置值。in, represents the state of the positive candidate memory unit, i.e., the first candidate memory data, and The weight coefficient and bias value representing the positive candidate memory unit are the third weight coefficient and bias value.

关于所述第三权重系数和偏置值可以参阅上述步骤502中,关于第一权重系数和偏置值的说明,故在此不再一一赘述。For the third weight coefficient and the bias value, please refer to the description of the first weight coefficient and the bias value in the above step 502, so they will not be repeated here.

步骤505,根据所述第一遗忘门数据、所述第一输入门数据、所述第一候选记忆数据以及第一历史更新记忆数据,进行数据计算处理,得到第一更新记忆数据,所述第一历史更新记忆数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的更新记忆数据。Step 505: Perform data calculation and processing based on the first forget gate data, the first input gate data, the first candidate memory data, and the first historical updated memory data to obtain first updated memory data, where the first historical updated memory data is updated memory data calculated based on user data generated in an adjacent time period before the time period information.

在本公开实施例中,所述第一更新记忆数据为所述第一激活输入数据经过正向更新记忆单元计算后,得到的正向更新记忆单元状态,所述正向更新记忆单元综合了正向遗忘门、正向输入门和正向候选记忆单元的状态结果,正向遗忘门决定何种数据需要丢弃,正向输入门决定何种新数据需要加入,正向候选记忆单元提供了新的状态信息,此三种数据以及历史记忆单元状态更新的综合形成了所述正向记忆单元状态,同时正向记忆单元状态同样需作为历史记忆单元状态传递至下一个时间步长。In the disclosed embodiment, the first updated memory data is the forward updated memory unit state obtained after the first activated input data is calculated by the forward updated memory unit. The forward updated memory unit integrates the state results of the forward forget gate, the forward input gate and the forward candidate memory unit. The forward forget gate determines what kind of data needs to be discarded, the forward input gate determines what kind of new data needs to be added, and the positive candidate memory unit provides new state information. The combination of these three types of data and the historical memory unit state update forms the forward memory unit state. At the same time, the forward memory unit state also needs to be passed to the next time step as the historical memory unit state.

具体的,关于第一更新记忆数据的计算过程,可以采用但不局限于公式(6)进行:Specifically, the calculation process of the first updated memory data may be performed using, but not limited to, formula (6):

公式(6) Formula (6)

其中,表示正向更新记忆单元状态即所述第一更新记忆数据,表示上一时间步的正向更新记忆单元状态即所述第一历史更新记忆数据,表示正向遗忘门状态(第一遗忘门数据),表示正向输入门状态(第一输入门数据),表示正向候选记忆单元状态(第一候选记忆数据),表示逐元素乘法。in, Indicates the state of the memory unit is updated in the forward direction, i.e., the first updated memory data, represents the state of the forward updated memory unit at the previous time step, i.e., the first historical updated memory data, Indicates the forward forget gate state (first forget gate data), Indicates the state of the positive input gate (first input gate data), Represents the state of the positive candidate memory unit (the first candidate memory data), Represents element-wise multiplication.

步骤506,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第四权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输出门数据,所述第四权重系数和偏置值用于控制所述第一激活输入数据的输出状态生成程度。Step 506, after data calculation and processing according to the first activation input data, the first historical hidden state data, and the fourth weight coefficient and bias value, activation is performed through the first preset activation function to obtain the first output gate data, and the fourth weight coefficient and bias value are used to control the output state generation degree of the first activation input data.

在本公开实施例中,所述第一输出门数据为所述第一激活输入数据经过正向输出门计算后,得到的正向输出门状态,所述正向输出门决定了下一个隐藏状态应该包含的数据,通过对实际要输出的隐藏状态部分进行控制,使隐藏状态只包含需关注数据,减少输出的隐藏状态中的冗余数据,对最终预测结果的干扰。In the disclosed embodiment, the first output gate data is the forward output gate state obtained after the first activated input data is calculated by the forward output gate. The forward output gate determines the data that the next hidden state should contain. By controlling the hidden state part actually to be output, the hidden state only contains the data that needs attention, thereby reducing the redundant data in the output hidden state and interfering with the final prediction result.

具体的,关于第一输出门数据的计算过程,可以采用但不局限于公式(7)进行:Specifically, the calculation process of the first output gate data may be performed using, but not limited to, formula (7):

公式(7) Formula (7)

其中,表示正向输出门状态即所述第一输出门数据,表示正向输出门的权重系数和偏置值即所述第四权重系数和偏置值。in, represents the forward output gate state, i.e., the first output gate data, and The weight coefficient and bias value representing the forward output gate are the fourth weight coefficient and bias value.

关于所述第四权重系数和偏置值可以参阅上述步骤502中,关于第一权重系数和偏置值的说明,故在此不再一一赘述。Regarding the fourth weight coefficient and the bias value, reference may be made to the description of the first weight coefficient and the bias value in the above step 502, so they will not be described in detail here.

步骤507,根据所述第一更新记忆数据以及所述第一输出门数据进行数据计算处理,得到所述第一隐藏状态数据。Step 507: Perform data calculation processing according to the first updated memory data and the first output gate data to obtain the first hidden state data.

在本公开实施例中,所述第一隐藏状态数据为在网络的输出阶段,在预测模型中的LSTM结构的内部记忆状态,所述内部记忆状态由网络在处理序列数据时累积和传递的信息所决定,所述第一隐藏状态数据可以携带之前所有时间步的信息,并且参与到后续时间步的计算中,因此,所述第一隐藏状态数据的计算是预测模型中的LSTM结构能够处理和预测序列数据的关键。In the disclosed embodiment, the first hidden state data is the internal memory state of the LSTM structure in the prediction model at the output stage of the network. The internal memory state is determined by the information accumulated and transmitted by the network when processing sequence data. The first hidden state data can carry information of all previous time steps and participate in the calculation of subsequent time steps. Therefore, the calculation of the first hidden state data is the key to the LSTM structure in the prediction model being able to process and predict sequence data.

具体的,关于第一隐藏状态数据的计算过程,可以采用但不局限于公式(8)进行:Specifically, the calculation process of the first hidden state data may be performed using, but not limited to, formula (8):

公式(8) Formula (8)

其中,表示所述第一隐藏状态数据,表示合并计算处理,在进行第一隐藏状态数据的计算时,需将所述第一更新记忆数据通过所述第二激活函数进行激活之后,再与所述第一输出门数据进行计算,得到所述第一隐藏状态数据。in, represents the first hidden state data, Indicates a merge calculation process. When calculating the first hidden state data, the first updated memory data needs to be activated by the second activation function and then calculated with the first output gate data to obtain the first hidden state data.

在本公开实施例的一种可实现方式中,作为上述步骤102的细化,关于所述用户停留状态向量序列与所述用户数据向量的第二推算处理,本公开实施例提供了一种第二推算处理的流程示意图,如图6所示,包括:In an implementable manner of an embodiment of the present disclosure, as a refinement of the above step 102, regarding the second inference processing of the user stay state vector sequence and the user data vector, an embodiment of the present disclosure provides a flow chart of a second inference processing, as shown in FIG6, including:

步骤601,通过第三预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第二激活输入数据,所述第二激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息。Step 601, activate the user stay state vector sequence and the user data vector through a third preset activation function to obtain second activation input data, wherein the second activation input data includes the time data information, and the time data information at least includes the time period information for generating the user data.

在本公开实施例中,与上述第一推算处理相同的,同样需将所述用户停留状态向量序列与所述用户数据向量进行合并,得到输入数据,具体的关于所述输入数据,请参阅上述步骤501中的说明,故在此不再一一赘述。In the embodiment of the present disclosure, similar to the first inference process described above, it is also necessary to merge the user stay state vector sequence with the user data vector to obtain input data. For details about the input data, please refer to the description in the above step 501, so it will not be repeated here.

所述第三预设激活函数为自定义选择的一种激活函数,例如:Sigmoid函数等,具体的,关于所述第三预设激活函数,本公开实施例不进行限制。The third preset activation function is a custom-selected activation function, such as a Sigmoid function, etc. Specifically, the third preset activation function is not limited in the embodiment of the present disclosure.

为了便于理解,后续第三预设激活函数同样以Sigmoid函数为例进行说明,因此,所述第二激活输入数据可以表示为:,其中,为所述第二激活输入数据。For ease of understanding, the subsequent third preset activation function is also explained using the Sigmoid function as an example. Therefore, the second activation input data can be expressed as: ,in, Enter data for the second activation.

步骤602,根据所述第二激活输入数据、第二历史隐藏状态数据以及第五权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二遗忘门数据,其中,所述第二历史隐藏状态数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第五权重系数和偏置值用于控制所述第二激活输入数据的数据遗忘程度。Step 602, after data calculation and processing are performed according to the second activation input data, the second historical hidden state data, and the fifth weight coefficient and the bias value, activation is performed through the third preset activation function to obtain second forgetting gate data, wherein the second historical hidden state data is hidden state data calculated based on user data generated in an adjacent time period after the time period information, and the fifth weight coefficient and the bias value are used to control the data forgetting degree of the second activation input data.

在本公开实施例中,关于所述第二遗忘门数据以及反向遗忘门,请参阅上述步骤502中关于第一遗忘门数据以及正向遗忘门的说明,故在此不再一一赘述。In the embodiment of the present disclosure, regarding the second forget gate data and the reverse forget gate, please refer to the description of the first forget gate data and the forward forget gate in the above step 502, so they will not be repeated here.

具体的,关于第二遗忘门数据的计算过程,可以采用但不局限于公式(9)进行:Specifically, the calculation process of the second forget gate data can be performed using but not limited to formula (9):

公式(9) Formula (9)

其中,表示反向遗忘门状态即所述第二遗忘门数据,表示激活函数Sigmoid,表示t+1时刻的反向隐层状态值即所述第二历史隐藏状态数据,表示反向遗忘门的权重系数和偏置值即所述第五权重系数和偏置值。in, Represents the reverse forget gate state, i.e., the second forget gate data, represents the activation function Sigmoid, represents the reverse hidden layer state value at time t+1, i.e., the second historical hidden state data, and The weight coefficient and bias value representing the reverse forget gate are the fifth weight coefficient and bias value.

关于所述第五权重系数和偏置值可以参阅上述步骤502中,关于第一权重系数和偏置值的说明,故在此不再一一赘述。For the fifth weight coefficient and the bias value, reference may be made to the description of the first weight coefficient and the bias value in the above step 502, so they will not be described in detail here.

步骤603,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第六权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输入门数据,所述第六权重系数和偏置值用于控制所述第二激活输入数据的新数据接受程度。Step 603, after data calculation and processing according to the second activation input data, the second historical hidden state data, and the sixth weight coefficient and bias value, activation is performed through the third preset activation function to obtain the second input gate data, and the sixth weight coefficient and bias value are used to control the degree of acceptance of new data of the second activation input data.

在本公开实施例中,关于所述第二输入门数据以及反向输入门,请参阅上述步骤503中关于第一输入门数据以及正向输入门的说明,故在此不再一一赘述。In the embodiment of the present disclosure, regarding the second input gate data and the reverse input gate, please refer to the description regarding the first input gate data and the forward input gate in the above step 503, so they will not be described one by one here.

具体的,关于第二输入门数据的计算过程,可以采用但不局限于公式(10)进行:Specifically, the calculation process of the second input gate data may be performed using, but not limited to, formula (10):

公式(10) Formula (10)

其中,表示反向输入门状态即所述第二输入门数据,表示反向输入门的权重系数和偏置值即所述第六权重系数和偏置值。in, Indicates the reverse input gate state, i.e., the second input gate data, and The weight coefficient and bias value representing the reverse input gate are the sixth weight coefficient and bias value.

关于所述第六权重系数和偏置值可以参阅上述步骤502中,关于第一权重系数和偏置值的说明,故在此不再一一赘述。Regarding the sixth weight coefficient and the bias value, reference may be made to the description of the first weight coefficient and the bias value in the above step 502, so they will not be described in detail here.

步骤604,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第七权重系数和偏置值进行数据计算处理之后,通过第四预设激活函数进行激活,得到第二候选记忆数据,所述第七权重系数和偏置值用于对所述第二激活输入数据进行数据调整。Step 604, after data calculation and processing are performed based on the second activation input data, the second historical hidden state data, and the seventh weight coefficient and bias value, activation is performed through the fourth preset activation function to obtain the second candidate memory data, and the seventh weight coefficient and bias value are used to perform data adjustment on the second activation input data.

在本公开实施例中,关于所述第二候选记忆数据以及反向候选记忆单元,请参阅上述步骤504中关于第一候选记忆数据以及正向候选记忆单元的说明,故在此不再一一赘述。In the embodiment of the present disclosure, regarding the second candidate memory data and the reverse candidate memory unit, please refer to the description of the first candidate memory data and the forward candidate memory unit in the above step 504, so they are not repeated here.

所述第四预设激活函数为自定义选择的一个激活函数,例如:tanh函数等,具体的,关于所述第四预设激活函数,本公开实施例不进行限制。The fourth preset activation function is an activation function selected by user, such as a tanh function, etc. Specifically, the fourth preset activation function is not limited in the embodiment of the present disclosure.

关于第二候选记忆数据的计算过程,可以采用但不局限于公式(11)进行:The calculation process of the second candidate memory data may be performed using, but not limited to, formula (11):

公式(11) Formula (11)

其中,表示反向候选记忆单元状态即所述第二候选记忆数据,表示反向候选记忆单元的权重系数和偏置值即所述第七权重系数和偏置值。in, represents the reverse candidate memory cell state, i.e., the second candidate memory data, and The weight coefficient and bias value representing the reverse candidate memory unit are the seventh weight coefficient and bias value.

步骤605,根据所述第二遗忘门数据、所述第二输入门数据、所述第二候选记忆数据以及第二历史更新记忆数据,进行数据计算处理,得到第二更新记忆数据,所述第二历史更新记忆数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的更新记忆数据。Step 605: Perform data calculation and processing based on the second forget gate data, the second input gate data, the second candidate memory data and the second historical updated memory data to obtain second updated memory data, where the second historical updated memory data is updated memory data calculated based on user data generated in an adjacent time period after the time period information.

在本公开实施例中,关于所述第二更新记忆数据以及反向更新记忆单元,请参阅上述步骤505中关于第一更新记忆数据以及正向更新记忆单元的说明,故在此不再一一赘述。In the embodiment of the present disclosure, regarding the second updating memory data and the reverse updating memory unit, please refer to the description regarding the first updating memory data and the forward updating memory unit in the above step 505, so it will not be repeated here.

具体的,关于第二候选记忆数据的计算过程,可以采用但不局限于公式(12)进行:Specifically, the calculation process of the second candidate memory data may be performed using, but not limited to, formula (12):

公式(12) Formula (12)

其中,表示反向更新记忆单元状态即所述第二候选记忆数据,表示上一时间步的反向更新记忆单元状态即所述第二历史更新记忆数据,表示反向遗忘门状态(第二遗忘门数据),表示反向输入门状态(第二输入门数据),表示反向候选记忆单元状态(第二候选记忆数据),表示逐元素乘法。in, Indicates the reverse update of the memory unit state, i.e., the second candidate memory data, Indicates the reverse update memory unit state of the previous time step, i.e., the second historical update memory data, Represents the reverse forget gate state (second forget gate data), Indicates the reverse input gate state (second input gate data), Represents the reverse candidate memory cell state (second candidate memory data), Represents element-wise multiplication.

步骤606,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第八权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输出门数据,所述第八权重系数和偏置值用于控制所述第二激活输入数据的输出状态生成程度。Step 606, after data calculation and processing according to the second activation input data, the second historical hidden state data, and the eighth weight coefficient and bias value, activation is performed through the third preset activation function to obtain second output gate data, and the eighth weight coefficient and bias value are used to control the degree of output state generation of the second activation input data.

在本公开实施例中,关于所述第二输出门数据以及反向输出门,请参阅上述步骤506中关于第一输出门数据以及正向输出门的说明,故在此不再一一赘述。In the embodiment of the present disclosure, regarding the second output gate data and the reverse output gate, please refer to the description regarding the first output gate data and the forward output gate in the above step 506, so they will not be described one by one here.

具体的,关于第二输出门数据的计算过程,可以采用但不局限于公式(13)进行:Specifically, the calculation process of the second output gate data may be performed using, but not limited to, formula (13):

公式(13) Formula (13)

其中,表示反向输出门状态即所述第二输出门数据,表示反向输出门的权重系数和偏置值即所述第八权重系数和偏置值。in, Indicates the reverse output gate state, i.e., the second output gate data, and The weight coefficient and bias value representing the reverse output gate are the eighth weight coefficient and bias value.

步骤607,根据所述第二更新记忆数据以及所述第二输出门数据进行数据计算处理,得到所述第二隐藏状态数据。Step 607: Perform data calculation processing according to the second updated memory data and the second output gate data to obtain the second hidden state data.

在本公开实施例中,关于所述第二隐藏状态数据,请参阅上述步骤507中关于第一隐藏状态数据的说明,故在此不再一一赘述。In the embodiment of the present disclosure, regarding the second hidden state data, please refer to the description regarding the first hidden state data in the above step 507, so it will not be described in detail here.

具体的,关于第二隐藏状态数据的计算过程,可以采用但不局限于公式(14)进行:Specifically, the calculation process of the second hidden state data may be performed using, but not limited to, formula (14):

公式(14) Formula (14)

其中,表示所述第二隐藏状态数据,表示合并计算处理,在进行第二隐藏状态数据的计算时,需将所述第二更新记忆数据通过所述第四激活函数进行激活之后,再与所述第二输出门数据进行计算,得到所述第二隐藏状态数据。in, represents the second hidden state data, Indicates a merge calculation process. When calculating the second hidden state data, the second updated memory data needs to be activated by the fourth activation function and then calculated with the second output gate data to obtain the second hidden state data.

在本公开实施例的一种可实现方式中,所述第三隐藏状态数据为处理和预测序列数据的中间信息,且表现形式为向量、矩阵等,不能直接作为分布预测的结果,需要对所述第三隐藏状态数据进行数据转化处理,因此,为了可以获取分布预测的结果,可以采用但不局限于以下方式实现:将所述第三隐藏状态数据输入至预设全连接结构中进行全连接处理,得到全连接数据;通过第五预设激活函数对所述全连接数据进行数据激活处理,得到概率分布数据,并将所述概率分布数据作为所述分布预测结果。In one implementable method of the embodiment of the present disclosure, the third hidden state data is intermediate information for processing and predicting sequence data, and is expressed in the form of vectors, matrices, etc. It cannot be directly used as the result of distribution prediction, and data conversion processing is required for the third hidden state data. Therefore, in order to obtain the result of distribution prediction, it can be implemented by but not limited to the following methods: input the third hidden state data into a preset fully connected structure for full connection processing to obtain fully connected data; perform data activation processing on the fully connected data through the fifth preset activation function to obtain probability distribution data, and use the probability distribution data as the distribution prediction result.

在本公开实施例中,所述预设全连接结构为自定义选择的一个全连接层,用于将所述第三隐藏状态数据映射到输出空间,所述第五预设激活函数为自定义选择的一种函数,例如:softmax函数、线性激活函数等,用于将映射到输出空间的线性输出转化为概率分布,输出对应类别的预测概率产生最终的输出结果。In the embodiment of the present disclosure, the preset fully connected structure is a fully connected layer of custom selection, which is used to map the third hidden state data to the output space, and the fifth preset activation function is a function of custom selection, such as: softmax function, linear activation function, etc., which is used to convert the linear output mapped to the output space into a probability distribution, and output the predicted probability of the corresponding category to generate the final output result.

综上所述,本公开实施例能实现以下效果:In summary, the embodiments of the present disclosure can achieve the following effects:

1.本公开实施例通过将用户数据转化为向量,将转化后的向量以正序和逆序的方式输入至预测模型进行正向推算和反向推算处理,并将两个推算结果转化为最终分布预测结果,可以无需高精度的用户数据,且同时关注了用户的空间位置信息以及时间特征信息,提高了用户分布的预测结果的准确性。1. The disclosed embodiment converts user data into vectors, inputs the converted vectors into the prediction model in positive and reverse order for forward and reverse calculation, and converts the two calculation results into the final distribution prediction result. This eliminates the need for high-precision user data and simultaneously focuses on the user's spatial location information and temporal feature information, thereby improving the accuracy of the prediction result of the user distribution.

2.本公开实施例通过一种自然语言处理技术的改进的GloVe方法,有效的解决了静态文本数据无法以向量表示的问题,采用自然语言处理技术改进的GloVe方法,通过共现矩阵与训练学习并行的方式处理目标用户数据中的数据,并将数据转化为向量,能够提高向量转换效率。2. The disclosed embodiment uses an improved GloVe method based on natural language processing technology to effectively solve the problem that static text data cannot be represented by vectors. The improved GloVe method based on natural language processing technology is used to process the data in the target user data in a parallel manner of co-occurrence matrix and training learning, and convert the data into vectors, which can improve the efficiency of vector conversion.

3.本公开实施例通过采用的预测模型中包含有双向LSTM循环神经元、softmax函数,通过双向LSTM循环神经元从正向和反向对目标用户数据集进行推算,使得上下文表达更加紧密,在时间维度上的特征更加显著,可以较好的测度时间维度,能够得到不同时间粒度下云电脑用户在时间维度上的分布波动,可为云电脑产品精准推介提供可视化效果。3. The prediction model adopted by the disclosed embodiment includes a bidirectional LSTM recurrent neuron and a softmax function. The target user data set is inferred from the forward and reverse directions through the bidirectional LSTM recurrent neuron, so that the context expression is more compact, the characteristics in the time dimension are more significant, the time dimension can be better measured, and the distribution fluctuation of cloud computer users in the time dimension under different time granularities can be obtained, which can provide a visualization effect for the accurate promotion of cloud computer products.

与上述的时空分布的预测方法相对应,本发明还提出一种时空分布的预测装置。由于本发明的装置实施例与上述的方法实施例相对应,对于装置实施例中未披露的细节可参照上述的方法实施例,本发明中不再进行赘述。Corresponding to the above-mentioned prediction method of spatiotemporal distribution, the present invention also proposes a prediction device of spatiotemporal distribution. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

图7为本公开实施例提供的一种时空分布的预测装置的结构示意图,如图7所示,包括:FIG. 7 is a schematic diagram of the structure of a prediction device for spatiotemporal distribution provided by an embodiment of the present disclosure. As shown in FIG. 7 , the device comprises:

过滤单元71,用于将采集的原始用户数据进行过滤处理,得到目标用户数据;The filtering unit 71 is used to filter the collected original user data to obtain target user data;

处理单元72,用于对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;The processing unit 72 is used to perform data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and to perform data conversion processing on the target user data to obtain a user data vector corresponding to the target user data;

输入单元73,用于将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;An input unit 73 is used to input the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference process to obtain first hidden state data corresponding to the target user data, and to perform a second inference process on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data;

转化单元74,用于根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果。The conversion unit 74 is used to obtain third hidden state data corresponding to the target user data according to the first hidden state data and the second hidden state data, and perform data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result.

本公开提供的时空分布的预测装置,将采集的原始用户数据进行过滤处理,得到目标用户数据,并对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果。与相关技术相比,本公开实施例通过将用户数据转化为向量,将转化后的向量以正序和逆序的方式输入至预测模型进行正向推算和反向推算处理,并将两个推算结果转化为最终分布预测结果,可以无需高精度的用户数据,且同时关注了用户的空间位置信息以及时间特征信息,提高了用户分布的预测结果的准确性。The prediction device for spatiotemporal distribution provided by the present disclosure filters the collected original user data to obtain target user data, performs data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and performs data conversion processing on the target user data to obtain a user data vector corresponding to the target user data; inputs the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference processing to obtain first hidden state data corresponding to the target user data, and performs a second inference processing on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data; obtains third hidden state data corresponding to the target user data based on the first hidden state data and the second hidden state data, and performs data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result. Compared with the related art, the embodiment of the present disclosure converts user data into vectors, inputs the converted vectors into the prediction model in forward and reverse order for forward and reverse calculation processing, and converts the two calculation results into final distribution prediction results. It does not require high-precision user data and pays attention to the user's spatial location information and time feature information at the same time, thereby improving the accuracy of the prediction results of user distribution.

进一步地,在本公开实施例一种可能的实现方式中,如图8所示,所述处理单元72包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG8 , the processing unit 72 includes:

转化模块721,用于根据所述目标用户数据中携带的空间数据信息以及时间数据信息,对所述目标用户数据进行数据转化,得到用户停留状态向量;The conversion module 721 is used to perform data conversion on the target user data according to the spatial data information and the time data information carried in the target user data to obtain a user stay state vector;

排列模块722,用于根据所述时间数据信息对所述用户停留状态向量进行数据排列,得到所述用户停留状态向量序列。The arrangement module 722 is used to arrange the user stay state vector according to the time data information to obtain the user stay state vector sequence.

进一步地,在本公开实施例一种可能的实现方式中,如图8所示,所述处理单元72还包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG8 , the processing unit 72 further includes:

转换模块723,用于将所述目标用户数据中的地理数据进行数据转换处理,得到地理数据向量;The conversion module 723 is used to perform data conversion processing on the geographic data in the target user data to obtain a geographic data vector;

所述转换模块723还用于,通过预设数据转换算法对所述目标用户数据中的其他数据,进行数据转换处理,得到其他数据向量,其中,所述其他数据为所述目标用户数据中,除所述地理数据外的所有数据;The conversion module 723 is further used to perform data conversion processing on other data in the target user data by using a preset data conversion algorithm to obtain other data vectors, wherein the other data is all data in the target user data except the geographic data;

合并模块724,用于将所述地理数据向量以及所述其他数据向量进行合并处理,得到所述用户数据向量。The merging module 724 is used to merge the geographic data vector and the other data vector to obtain the user data vector.

进一步地,在本公开实施例一种可能的实现方式中,如图8所示,所述输入单元73包括:Further, in a possible implementation of the embodiment of the present disclosure, as shown in FIG8 , the input unit 73 includes:

第一激活模块731,用于通过第一预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第一激活输入数据,所述第一激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;A first activation module 731 is configured to activate the user stay state vector sequence and the user data vector by using a first preset activation function to obtain first activation input data, where the first activation input data includes the time data information, and the time data information includes at least time period information for generating the user data;

第一计算模块732,用于根据所述第一激活输入数据、第一历史隐藏状态数据以及第一权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一遗忘门数据,其中,所述第一历史隐藏状态数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第一权重系数和偏置值用于控制所述第一激活输入数据的数据遗忘程度;A first calculation module 732 is used to perform data calculation processing according to the first activation input data, the first historical hidden state data, and the first weight coefficient and the bias value, and then activate through the first preset activation function to obtain first forget gate data, wherein the first historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period before the time period information, and the first weight coefficient and the bias value are used to control the data forgetting degree of the first activation input data;

所述第一计算模块732还用于,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第二权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输入门数据,所述第二权重系数和偏置值用于控制所述第一激活输入数据的新数据接受程度;The first calculation module 732 is further used to, after performing data calculation processing according to the first activation input data, the first historical hidden state data, and the second weight coefficient and the bias value, activate through the first preset activation function to obtain the first input gate data, and the second weight coefficient and the bias value are used to control the new data acceptance degree of the first activation input data;

所述第一计算模块732还用于,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第三权重系数和偏置值进行数据计算处理之后,通过第二预设激活函数进行激活,得到第一候选记忆数据,所述第三权重系数和偏置值用于对所述第一激活输入数据进行数据调整;The first calculation module 732 is further used to, after performing data calculation processing according to the first activation input data, the first historical hidden state data, and the third weight coefficient and the bias value, activate through a second preset activation function to obtain first candidate memory data, and the third weight coefficient and the bias value are used to perform data adjustment on the first activation input data;

所述第一计算模块732还用于,根据所述第一遗忘门数据、所述第一输入门数据、所述第一候选记忆数据以及第一历史更新记忆数据,进行数据计算处理,得到第一更新记忆数据,所述第一历史更新记忆数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的更新记忆数据;The first calculation module 732 is further used to perform data calculation processing according to the first forget gate data, the first input gate data, the first candidate memory data and the first historical update memory data to obtain first update memory data, where the first historical update memory data is update memory data calculated according to user data generated in an adjacent time period before the time period information;

所述第一计算模块732还用于,根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第四权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输出门数据,所述第四权重系数和偏置值用于控制所述第一激活输入数据的输出状态生成程度;The first calculation module 732 is further used to, after performing data calculation processing according to the first activation input data, the first historical hidden state data, and the fourth weight coefficient and the bias value, activate through the first preset activation function to obtain the first output gate data, and the fourth weight coefficient and the bias value are used to control the output state generation degree of the first activation input data;

所述第一计算模块732还用于,根据所述第一更新记忆数据以及所述第一输出门数据进行数据计算处理,得到所述第一隐藏状态数据。The first calculation module 732 is further used to perform data calculation processing according to the first updated memory data and the first output gate data to obtain the first hidden state data.

进一步地,在本公开实施例一种可能的实现方式中,如图8所示,所述输入单元73还包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG8 , the input unit 73 further includes:

第二激活模块733,用于通过第三预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第二激活输入数据,所述第二激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;A second activation module 733 is used to activate the user stay state vector sequence and the user data vector through a third preset activation function to obtain second activation input data, where the second activation input data includes the time data information, and the time data information at least includes time period information for generating the user data;

第二计算模块734,用于根据所述第二激活输入数据、第二历史隐藏状态数据以及第五权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二遗忘门数据,其中,所述第二历史隐藏状态数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第五权重系数和偏置值用于控制所述第二激活输入数据的数据遗忘程度;A second calculation module 734 is used to perform data calculation processing according to the second activation input data, the second historical hidden state data, and the fifth weight coefficient and the bias value, and then activate through the third preset activation function to obtain second forget gate data, wherein the second historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period after the time period information, and the fifth weight coefficient and the bias value are used to control the data forgetting degree of the second activation input data;

所述第二计算模块734还用于,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第六权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输入门数据,所述第六权重系数和偏置值用于控制所述第二激活输入数据的新数据接受程度;The second calculation module 734 is further used to, after performing data calculation processing according to the second activation input data, the second historical hidden state data, and the sixth weight coefficient and the bias value, activate through the third preset activation function to obtain second input gate data, and the sixth weight coefficient and the bias value are used to control the new data acceptance degree of the second activation input data;

所述第二计算模块734还用于,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第七权重系数和偏置值进行数据计算处理之后,通过第四预设激活函数进行激活,得到第二候选记忆数据,所述第七权重系数和偏置值用于对所述第二激活输入数据进行数据调整;The second calculation module 734 is further used to, after performing data calculation processing according to the second activation input data, the second historical hidden state data, and the seventh weight coefficient and the bias value, activate through a fourth preset activation function to obtain second candidate memory data, and the seventh weight coefficient and the bias value are used to perform data adjustment on the second activation input data;

所述第二计算模块734还用于,根据所述第二遗忘门数据、所述第二输入门数据、所述第二候选记忆数据以及第二历史更新记忆数据,进行数据计算处理,得到第二更新记忆数据,所述第二历史更新记忆数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的更新记忆数据;The second calculation module 734 is further used to perform data calculation processing according to the second forget gate data, the second input gate data, the second candidate memory data and the second historical update memory data to obtain second updated memory data, where the second historical update memory data is updated memory data calculated according to user data generated in an adjacent time period after the time period information;

所述第二计算模块734还用于,根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第八权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输出门数据,所述第八权重系数和偏置值用于控制所述第二激活输入数据的输出状态生成程度;The second calculation module 734 is further used to, after performing data calculation processing according to the second activation input data, the second historical hidden state data, and the eighth weight coefficient and the bias value, activate through the third preset activation function to obtain second output gate data, and the eighth weight coefficient and the bias value are used to control the output state generation degree of the second activation input data;

所述第二计算模块734还用于,根据所述第二更新记忆数据以及所述第二输出门数据进行数据计算处理,得到所述第二隐藏状态数据。The second calculation module 734 is further used to perform data calculation processing according to the second updated memory data and the second output gate data to obtain the second hidden state data.

进一步地,在本公开实施例一种可能的实现方式中,如图8所示,所述转化单元74包括:Furthermore, in a possible implementation of the embodiment of the present disclosure, as shown in FIG8 , the conversion unit 74 includes:

处理模块741,用于将所述第三隐藏状态数据输入至预设全连接结构中进行全连接处理,得到全连接数据;A processing module 741 is used to input the third hidden state data into a preset fully connected structure for full connection processing to obtain fully connected data;

激活模块742,用于通过第五预设激活函数对所述全连接数据进行数据激活处理,得到概率分布数据,并将所述概率分布数据作为所述分布预测结果。The activation module 742 is used to perform data activation processing on the fully connected data through a fifth preset activation function to obtain probability distribution data, and use the probability distribution data as the distribution prediction result.

需要说明的是,前述对方法实施例的解释说明,也适用于本公开实施例的装置,原理相同,本公开实施例中不再限定。It should be noted that the above explanation of the method embodiment is also applicable to the device of the embodiment of the present disclosure, and the principle is the same, which is no longer limited in the embodiment of the present disclosure.

根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

图9示出了可以用来实施本公开的实施例的示例电子设备900的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。FIG9 shows a schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and/or required herein.

如图9所示,设备900包括计算单元901,其可以根据存储在ROM(Read-OnlyMemory,只读存储器)902中的计算机程序或者从存储单元908加载到RAM(Random AccessMemory,随机访问/存取存储器) 903中的计算机程序,来执行各种适当的动作和处理。在RAM 903中,还可存储设备900操作所需的各种程序和数据。计算单元901、ROM 902以及RAM903通过总线904彼此相连。I/O(Input/Output,输入/输出) 接口905也连接至总线904。As shown in FIG9 , the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded from a storage unit 908 to a RAM (Random Access Memory) 903. Various programs and data required for the operation of the device 900 can also be stored in the RAM 903. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An I/O (Input/Output) interface 905 is also connected to the bus 904.

设备900中的多个部件连接至I/O接口905,包括:输入单元906,例如键盘、鼠标等;输出单元907,例如各种类型的显示器、扬声器等;存储单元908,例如磁盘、光盘等;以及通信单元909,例如网卡、调制解调器、无线通信收发机等。通信单元909允许设备900通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。A number of components in the device 900 are connected to the I/O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

计算单元901可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元901的一些示例包括但不限于CPU(Central Processing Unit,中央处理单元)、GPU(Graphic Processing Units,图形处理单元) 、各种专用的AI(ArtificialIntelligence,人工智能) 计算芯片、各种运行机器学习模型算法的计算单元、DSP(Digital Signal Processor,数字信号处理器) 、以及任何适当的处理器、控制器、微控制器等。计算单元901执行上文所描述的各个方法和处理,例如时空分布的预测方法。例如,在一些实施例中,时空分布的预测方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元908。在一些实施例中,计算机程序的部分或者全部可以经由ROM902和/或通信单元909而被载入和/或安装到设备900上。当计算机程序加载到RAM 903并由计算单元901执行时,可以执行上文描述的方法的一个或多个步骤。备选地,在其他实施例中,计算单元901可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行前述时空分布的预测方法。The computing unit 901 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, CPU (Central Processing Unit), GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the prediction method of spatiotemporal distribution. For example, in some embodiments, the prediction method of spatiotemporal distribution may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed on the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the aforementioned spatiotemporal distribution prediction method in any other appropriate manner (for example, by means of firmware).

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、FPGA(Field Programmable Gate Array,现场可编程门阵列)、ASIC(Application-Specific Integrated Circuit,专用集成电路)、ASSP(Application Specific StandardProduct,专用标准产品)、SOC(System On Chip,芯片上系统的系统)、CPLD(ComplexProgrammable Logic Device,复杂可编程逻辑设备) 、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and/or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions/operations specified in the flow chart and/or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、RAM、ROM、EPROM(Electrically Programmable Read-Only-Memory,可擦除可编程只读存储器) 或快闪存储器、光纤、CD-ROM(Compact Disc Read-Only Memory,便捷式紧凑盘只读存储器) 、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage device, magnetic storage device, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(Cathode-Ray Tube, 阴极射线管)或者LCD(Liquid Crystal Display, 液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:LAN(LocalArea Network,局域网)、WAN(Wide Area Network,广域网) 、互联网和区块链网络。The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务("Virtual Private Server",或简称 "VPS")中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

其中,需要说明的是,人工智能是研究使计算机来模拟人的某些思维过程和智能行为(如学习、推理、思考、规划等)的学科,既有硬件层面的技术也有软件层面的技术。人工智能硬件技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理等技术;人工智能软件技术主要包括计算机视觉技术、语音识别技术、自然语言处理技术以及机器学习/深度学习、大数据处理技术、知识图谱技术等几大方向。It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning/deep learning, big data processing technology, knowledge graph technology, and other major directions.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (9)

1.一种时空分布的预测方法,其特征在于,包括:1. A method for predicting spatiotemporal distribution, comprising: 将采集的原始用户数据进行过滤处理,得到目标用户数据,并对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;Filtering the collected original user data to obtain target user data, performing data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and performing data conversion processing on the target user data to obtain a user data vector corresponding to the target user data; 将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;Inputting the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference process to obtain first hidden state data corresponding to the target user data, and performing a second inference process on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data; 根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果;Obtaining third hidden state data corresponding to the target user data according to the first hidden state data and the second hidden state data, and performing data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result; 其中,所述对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列包括:The performing data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data includes: 根据所述目标用户数据中携带的空间数据信息以及时间数据信息,对所述目标用户数据进行数据转化,得到用户停留状态向量;According to the spatial data information and the temporal data information carried in the target user data, the target user data is converted into data to obtain a user stay state vector; 根据所述时间数据信息对所述用户停留状态向量进行数据排列,得到所述用户停留状态向量序列。The user stay state vectors are arranged according to the time data information to obtain the user stay state vector sequence. 2.根据权利要求1所述的方法,其特征在于,所述对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量包括:2. The method according to claim 1, wherein the step of performing data conversion processing on the target user data to obtain a user data vector corresponding to the target user data comprises: 将所述目标用户数据中的地理数据进行数据转换处理,得到地理数据向量;Performing data conversion processing on the geographic data in the target user data to obtain a geographic data vector; 通过预设数据转换算法对所述目标用户数据中的其他数据,进行数据转换处理,得到其他数据向量,其中,所述其他数据为所述目标用户数据中,除所述地理数据外的所有数据;Performing data conversion processing on other data in the target user data by using a preset data conversion algorithm to obtain other data vectors, wherein the other data is all data in the target user data except the geographic data; 将所述地理数据向量以及所述其他数据向量进行合并处理,得到所述用户数据向量。The geographic data vector and the other data vectors are combined to obtain the user data vector. 3.根据权利要求1所述的方法,其特征在于,所述将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据包括:3. The method according to claim 1, characterized in that the step of inputting the user stay state vector sequence and the user data vector into a pre-trained prediction model for first inference processing to obtain the first hidden state data corresponding to the target user data comprises: 通过第一预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第一激活输入数据,所述第一激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;Activate the user stay state vector sequence and the user data vector through a first preset activation function to obtain first activation input data, where the first activation input data includes the time data information, and the time data information includes at least time period information for generating the user data; 根据所述第一激活输入数据、第一历史隐藏状态数据以及第一权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一遗忘门数据,其中,所述第一历史隐藏状态数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第一权重系数和偏置值用于控制所述第一激活输入数据的数据遗忘程度;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and the first weight coefficient and the bias value, activation is performed through the first preset activation function to obtain first forget gate data, wherein the first historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period before the time period information, and the first weight coefficient and the bias value are used to control the data forgetting degree of the first activation input data; 根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第二权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输入门数据,所述第二权重系数和偏置值用于控制所述第一激活输入数据的新数据接受程度;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and the second weight coefficient and the bias value, activation is performed through the first preset activation function to obtain first input gate data, and the second weight coefficient and the bias value are used to control the new data acceptance degree of the first activation input data; 根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第三权重系数和偏置值进行数据计算处理之后,通过第二预设激活函数进行激活,得到第一候选记忆数据,所述第三权重系数和偏置值用于对所述第一激活输入数据进行数据调整;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and the third weight coefficient and the bias value, activation is performed through a second preset activation function to obtain first candidate memory data, and the third weight coefficient and the bias value are used to perform data adjustment on the first activation input data; 根据所述第一遗忘门数据、所述第一输入门数据、所述第一候选记忆数据以及第一历史更新记忆数据,进行数据计算处理,得到第一更新记忆数据,所述第一历史更新记忆数据为根据所述时间段信息之前的相邻时间段内生成的用户数据计算的更新记忆数据;Performing data calculation processing according to the first forget gate data, the first input gate data, the first candidate memory data, and the first historical update memory data to obtain first update memory data, where the first historical update memory data is update memory data calculated according to user data generated in an adjacent time period before the time period information; 根据所述第一激活输入数据、所述第一历史隐藏状态数据以及第四权重系数和偏置值进行数据计算处理之后,通过所述第一预设激活函数进行激活,得到第一输出门数据,所述第四权重系数和偏置值用于控制所述第一激活输入数据的输出状态生成程度;After data calculation processing is performed according to the first activation input data, the first historical hidden state data, and a fourth weight coefficient and a bias value, activation is performed through the first preset activation function to obtain first output gate data, and the fourth weight coefficient and the bias value are used to control the degree of output state generation of the first activation input data; 根据所述第一更新记忆数据以及所述第一输出门数据进行数据计算处理,得到所述第一隐藏状态数据。Data calculation and processing are performed according to the first updated memory data and the first output gate data to obtain the first hidden state data. 4.根据权利要求1所述的方法,其特征在于,所述基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据包括:4. The method according to claim 1, characterized in that the performing a second inference process on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain the second hidden state data corresponding to the target user data comprises: 通过第三预设激活函数对所述用户停留状态向量序列与所述用户数据向量进行激活处理,得到第二激活输入数据,所述第二激活输入数据包含所述时间数据信息,所述时间数据信息至少包含生成所述用户数据的时间段信息;Activate the user stay state vector sequence and the user data vector by a third preset activation function to obtain second activation input data, where the second activation input data includes the time data information, and the time data information includes at least time period information for generating the user data; 根据所述第二激活输入数据、第二历史隐藏状态数据以及第五权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二遗忘门数据,其中,所述第二历史隐藏状态数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的隐藏状态数据,所述第五权重系数和偏置值用于控制所述第二激活输入数据的数据遗忘程度;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the fifth weight coefficient and the bias value, activation is performed through the third preset activation function to obtain second forget gate data, wherein the second historical hidden state data is hidden state data calculated according to user data generated in an adjacent time period after the time period information, and the fifth weight coefficient and the bias value are used to control the data forgetting degree of the second activation input data; 根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第六权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输入门数据,所述第六权重系数和偏置值用于控制所述第二激活输入数据的新数据接受程度;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the sixth weight coefficient and the bias value, activation is performed through the third preset activation function to obtain second input gate data, and the sixth weight coefficient and the bias value are used to control the new data acceptance degree of the second activation input data; 根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第七权重系数和偏置值进行数据计算处理之后,通过第四预设激活函数进行激活,得到第二候选记忆数据,所述第七权重系数和偏置值用于对所述第二激活输入数据进行数据调整;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the seventh weight coefficient and the bias value, activation is performed through a fourth preset activation function to obtain second candidate memory data, and the seventh weight coefficient and the bias value are used to perform data adjustment on the second activation input data; 根据所述第二遗忘门数据、所述第二输入门数据、所述第二候选记忆数据以及第二历史更新记忆数据,进行数据计算处理,得到第二更新记忆数据,所述第二历史更新记忆数据为根据所述时间段信息之后的相邻时间段内生成的用户数据计算的更新记忆数据;Performing data calculation processing according to the second forget gate data, the second input gate data, the second candidate memory data, and the second historical update memory data to obtain second update memory data, where the second historical update memory data is update memory data calculated according to user data generated in an adjacent time period after the time period information; 根据所述第二激活输入数据、所述第二历史隐藏状态数据以及第八权重系数和偏置值进行数据计算处理之后,通过所述第三预设激活函数进行激活,得到第二输出门数据,所述第八权重系数和偏置值用于控制所述第二激活输入数据的输出状态生成程度;After data calculation processing is performed according to the second activation input data, the second historical hidden state data, and the eighth weight coefficient and the bias value, activation is performed through the third preset activation function to obtain second output gate data, and the eighth weight coefficient and the bias value are used to control the degree of output state generation of the second activation input data; 根据所述第二更新记忆数据以及所述第二输出门数据进行数据计算处理,得到所述第二隐藏状态数据。Data calculation processing is performed according to the second updated memory data and the second output gate data to obtain the second hidden state data. 5.根据权利要求1所述的方法,其特征在于,所述对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果包括:5. The method according to claim 1, characterized in that the step of performing data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result comprises: 将所述第三隐藏状态数据输入至预设全连接结构中进行全连接处理,得到全连接数据;Inputting the third hidden state data into a preset fully connected structure for full connection processing to obtain fully connected data; 通过第五预设激活函数对所述全连接数据进行数据激活处理,得到概率分布数据,并将所述概率分布数据作为所述分布预测结果。The fully connected data is subjected to data activation processing by using a fifth preset activation function to obtain probability distribution data, and the probability distribution data is used as the distribution prediction result. 6.一种时空分布的预测装置,其特征在于,包括:6. A prediction device for spatiotemporal distribution, comprising: 过滤单元,用于将采集的原始用户数据进行过滤处理,得到目标用户数据;A filtering unit, used to filter the collected original user data to obtain target user data; 处理单元,用于对所述目标用户数据进行数据构建处理,得到所述目标用户数据对应的用户停留状态向量序列,以及对所述目标用户数据进行数据转换处理,得到所述目标用户数据对应的用户数据向量;a processing unit, configured to perform data construction processing on the target user data to obtain a user stay state vector sequence corresponding to the target user data, and to perform data conversion processing on the target user data to obtain a user data vector corresponding to the target user data; 输入单元,用于将所述用户停留状态向量序列与所述用户数据向量输入至预先训练好的预测模型中进行第一推算处理,得到所述目标用户数据对应的第一隐藏状态数据,以及基于所述预先训练好的预测模型对所述用户停留状态向量序列与所述用户数据向量进行第二推算处理,得到所述目标用户数据对应的第二隐藏状态数据;an input unit, configured to input the user stay state vector sequence and the user data vector into a pre-trained prediction model for a first inference process to obtain first hidden state data corresponding to the target user data, and to perform a second inference process on the user stay state vector sequence and the user data vector based on the pre-trained prediction model to obtain second hidden state data corresponding to the target user data; 转化单元,用于根据所述第一隐藏状态数据以及所述第二隐藏状态数据得到所述目标用户数据对应的第三隐藏状态数据,并对所述第三隐藏状态数据进行数据转化处理,得到对应的分布预测结果;a conversion unit, configured to obtain third hidden state data corresponding to the target user data according to the first hidden state data and the second hidden state data, and perform data conversion processing on the third hidden state data to obtain a corresponding distribution prediction result; 其中,所述处理单元包括:Wherein, the processing unit includes: 转化模块,用于根据所述目标用户数据中携带的空间数据信息以及时间数据信息,对所述目标用户数据进行数据转化,得到用户停留状态向量;A conversion module, configured to perform data conversion on the target user data according to the spatial data information and the temporal data information carried in the target user data, so as to obtain a user stay state vector; 排列模块,用于根据所述时间数据信息对所述用户停留状态向量进行数据排列,得到所述用户停留状态向量序列。The arrangement module is used to arrange the user stay state vector according to the time data information to obtain the user stay state vector sequence. 7. 一种电子设备,其特征在于,包括:7. An electronic device, comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-5中任一项所述的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5. 8.一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行根据权利要求1-5中任一项所述的方法。8. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5. 9.一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-5中任一项所述的方法。9. A computer program product, characterized in that it comprises a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 5.
CN202410587368.6A 2024-05-13 2024-05-13 Prediction method and device for spatiotemporal distribution, electronic device and storage medium Active CN118171744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410587368.6A CN118171744B (en) 2024-05-13 2024-05-13 Prediction method and device for spatiotemporal distribution, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410587368.6A CN118171744B (en) 2024-05-13 2024-05-13 Prediction method and device for spatiotemporal distribution, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN118171744A CN118171744A (en) 2024-06-11
CN118171744B true CN118171744B (en) 2024-08-16

Family

ID=91357011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410587368.6A Active CN118171744B (en) 2024-05-13 2024-05-13 Prediction method and device for spatiotemporal distribution, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN118171744B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707523A (en) * 2017-08-21 2018-02-16 时瑞科技(深圳)有限公司 A kind of control system pre-processed and method based on high in the clouds processing
CN116701396A (en) * 2023-06-12 2023-09-05 农业农村部大数据发展中心 Data indexing method based on homogeneous map structure FeatureRDD model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726181B (en) * 2024-02-06 2024-04-30 山东科技大学 Collaborative fusion and hierarchical prediction method for typical disaster risk heterogeneous information of coal mine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707523A (en) * 2017-08-21 2018-02-16 时瑞科技(深圳)有限公司 A kind of control system pre-processed and method based on high in the clouds processing
CN116701396A (en) * 2023-06-12 2023-09-05 农业农村部大数据发展中心 Data indexing method based on homogeneous map structure FeatureRDD model

Also Published As

Publication number Publication date
CN118171744A (en) 2024-06-11

Similar Documents

Publication Publication Date Title
JP7331975B2 (en) Cross-modal search model training methods, apparatus, equipment, and storage media
CN111611085B (en) Human-machine hybrid enhanced intelligent system, method and device based on cloud-edge collaboration
KR102635800B1 (en) Pre-training method, device, electronic equipment and medium of neural network model
CN116611546B (en) Knowledge-graph-based landslide prediction method and system for target research area
CN114358257A (en) Neural network pruning method and device, readable medium and electronic equipment
CN116993185B (en) Time sequence prediction method, device, equipment and storage medium
CN117407513B (en) Question processing method, device, equipment and storage medium based on large language model
CN115310590A (en) Graph structure learning method and device
CN112559721B (en) Method, device, equipment, medium and program product for adjusting man-machine dialogue system
CN114118570A (en) Service data prediction method and device, electronic equipment and storage medium
WO2023217127A1 (en) Causation determination method and related device
JP2022095895A (en) Traffic data prediction method, traffic data prediction device, electronic device, storage medium, computer program product, and computer program
CN113780662A (en) Flow prediction method, device, equipment and medium
CN113361574A (en) Training method and device of data processing model, electronic equipment and storage medium
CN112949433A (en) Method, device and equipment for generating video classification model and storage medium
CN116308854A (en) A Probability Diffusion-Based Information Cascading Popularity Prediction Method and System
CN119090543A (en) Model training or intervention gain prediction method, device, equipment and medium
CN118171744B (en) Prediction method and device for spatiotemporal distribution, electronic device and storage medium
CN118069473A (en) Alarm analysis method and device, electronic equipment and storage medium
KR20220061835A (en) Apparatus and method for hardware acceleration
CN116595371A (en) Topic heat prediction model training method, topic heat prediction method and topic heat prediction device
CN112541705A (en) Method, device, equipment and storage medium for generating user behavior evaluation model
CN116910682B (en) Event detection methods and devices, electronic equipment and storage media
CN113553407B (en) Event tracing method and device, electronic equipment and storage medium
CN114969543A (en) Promotion method, promotion system, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant