Model training methods, data adjustment methods, devices, equipment and media

CN116028818BActive Publication Date: 2026-08-14BEIJING JINGDONG SMART CITY BIG DATA RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-06
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]未针对时空数据的时空特性来针对性调整,使得所调整后的时空数据质量不够精准

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116028818B_ABST
    Figure CN116028818B_ABST
Patent Text Reader

Abstract

This disclosure presents embodiments of a model training method, a data adjustment method, an apparatus, a device, and a medium. One specific implementation of the method includes: acquiring a spatiotemporal data sequence; inputting the spatiotemporal data sequence into an initial data temporal and spatial heterogeneity adjustment model to output an enhanced spatiotemporal data sequence; inputting the spatiotemporal data sequence and the enhanced spatiotemporal data sequence into an initial spatiotemporal data encoding model to output a spatiotemporal encoded vector sequence and an enhanced spatiotemporal encoded vector sequence; generating at least one model from a model set based on the spatiotemporal encoded vector sequence, the enhanced spatiotemporal encoded vector sequence, and initial loss information, generating at least one loss information; and training the initial spatiotemporal data quality adjustment model to output a spatiotemporal data quality adjustment model. This implementation is related to artificial intelligence; by utilizing the spatiotemporal data quality adjustment model, more accurate and high-quality spatiotemporal data can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this disclosure relate to the field of computer technology, and specifically to model training methods, data adjustment methods, apparatus, devices, and media. Background Technology

[0002] Currently, with the development of technologies such as the Internet of Things (IoT), spatiotemporal prediction based on spatiotemporal data is a common prediction task in smart city applications. Because spatiotemporal data is collected from the real world, it is often limited by construction and maintenance costs, network fluctuations, and other factors, resulting in incomplete perception and missing information. These issues often lead to low quality spatiotemporal data. To improve the quality of spatiotemporal data, the common approach is to first use generative adversarial methods to compensate for missing or corrupted data, thereby improving the data quality.

[0003] However, the inventors discovered that when using the above method to adjust spatiotemporal data, the following technical problems often arise:

[0004] The lack of targeted adjustments based on the spatiotemporal characteristics of the spatiotemporal data resulted in insufficient accuracy in the quality of the adjusted spatiotemporal data.

[0005] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0007] Some embodiments of this disclosure provide model training methods, data adjustment methods, apparatuses, devices, and media to address the technical problems mentioned in the background section above.

[0008] In a first aspect, some embodiments of this disclosure provide a model training method, comprising: acquiring a spatiotemporal data sequence for a target region; inputting the spatiotemporal data sequence into an initial data temporal and spatial heterogeneity adjustment model included in an initial spatiotemporal data quality adjustment model to output an enhanced spatiotemporal data sequence; inputting the spatiotemporal data sequence and the enhanced spatiotemporal data sequence into an initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model to output a spatiotemporal encoding vector sequence and an enhanced spatiotemporal encoding vector sequence; generating at least one model set based on the spatiotemporal encoding vector sequence, the enhanced spatiotemporal encoding vector sequence, and initial loss information included in the initial spatiotemporal data quality adjustment model, and generating at least one loss information; and training the initial spatiotemporal data quality adjustment model based on the at least one loss information to output a spatiotemporal data quality adjustment model.

[0009] Optionally, the aforementioned initial data temporal and spatial heterogeneity adjustment model includes: an initial temporal heterogeneity adjustment model; and the aforementioned inputting the aforementioned spatiotemporal data sequence into the initial spatiotemporal data quality adjustment model, which includes the initial data temporal and spatial heterogeneity adjustment model, to output an enhanced spatiotemporal data sequence, includes: inputting each spatiotemporal data in the aforementioned spatiotemporal data sequence into the aforementioned initial temporal heterogeneity adjustment model to output enhanced spatiotemporal data.

[0010] Optionally, the spatiotemporal data in the aforementioned spatiotemporal data sequence includes multiple regional data; and the aforementioned inputting each spatiotemporal data in the aforementioned spatiotemporal data sequence into the aforementioned initial temporal heterogeneity adjustment model to output enhanced spatiotemporal data includes: for each regional data corresponding to the aforementioned spatiotemporal data among the multiple regional data, using the initial temporal heterogeneity adjustment model, performing the following first generation step: obtaining a regional temporal representation vector for the regional data; generating regional element probability information for the aforementioned regional data based on the aforementioned regional temporal representation vector and the parameters of the initial training model; generating regional masking information for the aforementioned regional data based on the aforementioned regional element probability information; and using the aforementioned initial spatiotemporal data temporal heterogeneity adjustment model, generating enhanced spatiotemporal data for the aforementioned spatiotemporal data based on the obtained regional masking information set.

[0011] Optionally, the aforementioned initial data temporal and spatial heterogeneity adjustment model includes: an initial inter-regional heterogeneity adjustment model; and the aforementioned input of the aforementioned spatiotemporal data sequence into the initial spatiotemporal data quality adjustment model, which includes the initial data temporal and spatial heterogeneity adjustment model, to output an enhanced spatiotemporal data sequence, includes: inputting each spatiotemporal data in the aforementioned spatiotemporal data sequence into the aforementioned initial inter-regional heterogeneity adjustment model to output enhanced spatiotemporal data.

[0012] Optionally, the spatiotemporal data in the aforementioned spatiotemporal data sequence includes multiple regional data; and the aforementioned inputting each spatiotemporal data in the aforementioned spatiotemporal data sequence into the aforementioned initial inter-regional heterogeneity adjustment model to output enhanced spatiotemporal data includes: for each regional data in the aforementioned multiple regional data, using the aforementioned initial inter-regional heterogeneity adjustment model, performing the following second generation step: generating a regional global time representation vector for the aforementioned regional data as a target regional global time representation vector; determining sub-regions that have a positional proximity relationship with the sub-regions corresponding to the aforementioned regional data, obtaining at least one sub-region information; determining the regional global time representation vector corresponding to each sub-region information in the aforementioned at least one sub-region information as a neighboring regional global time representation vector, obtaining at least one neighboring regional global time representation vector; generating a regional boundary line masking information set for the aforementioned regional data based on the aforementioned target regional global time representation vector and the aforementioned at least one neighboring regional global time representation vector; and generating enhanced spatiotemporal data for the aforementioned spatiotemporal data based on the obtained regional boundary line masking information set and the aforementioned multiple regional data.

[0013] Optionally, the aforementioned initial loss information generation model set includes: an initial spatial heterogeneity contrastive loss generation model; and the generation of at least one loss information based on at least one of the initial loss information generation model set included in the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial spatiotemporal data quality adjustment model, including: generating first loss information based on the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial spatial heterogeneity contrastive loss generation model.

[0014] Optionally, the spatiotemporal encoded vectors in the aforementioned spatiotemporal encoded vector sequence include multiple spatiotemporal encoded sub-vectors, and the enhanced spatiotemporal encoded vectors in the aforementioned enhanced spatiotemporal encoded vector sequence include multiple enhanced spatiotemporal encoded sub-vectors; and the generation of first loss information based on the aforementioned spatiotemporal encoded vector sequence, the aforementioned enhanced spatiotemporal encoded vector sequence, and the aforementioned initial spatial heterogeneity contrastive loss generation model includes: for each spatiotemporal encoded vector in the aforementioned spatiotemporal encoded vector sequence, performing the following third generation step: determining multiple spatiotemporal encoded sub-vectors corresponding to the aforementioned spatiotemporal encoded vector as multiple first target spatiotemporal encoded sub-vectors; for each of the aforementioned multiple first target spatiotemporal encoded sub-vectors, performing the following fourth generation step: determining the first enhanced spatiotemporal encoded sub-vector sequence in the aforementioned enhanced spatiotemporal encoded vector sequence that has a regional correspondence with the aforementioned first target spatiotemporal encoded vector; obtaining Multiple initial cluster center vectors corresponding to the spatiotemporal data clustering algorithm are obtained. Based on the multiple initial cluster center vectors, a first clustering result is generated for each first enhanced spatiotemporal coding sub-vector in the first enhanced spatiotemporal coding sub-vector sequence, resulting in a first clustering result sequence. Based on the multiple initial cluster center vectors, a second clustering result is generated corresponding to the first target spatiotemporal coding vector. Based on the first clustering result sequence and the second clustering result, clustering loss information for the first target spatiotemporal coding vector is generated using the initial spatial heterogeneity contrastive loss generation model. Based on the obtained multiple clustering loss information, spatial heterogeneity loss information for the spatiotemporal coding vector is generated using the initial spatial heterogeneity contrastive loss generation model. Based on the obtained spatial heterogeneity loss information sequence, the first loss information is generated using the initial spatial heterogeneity contrastive loss generation model.

[0015] Optionally, the aforementioned initial loss information generation model set includes: an initial temporal heterogeneity contrastive loss model; and the generation of at least one loss information based on at least one of the initial loss information generation model set included in the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial spatiotemporal data quality adjustment model, including: generating second loss information based on the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial temporal heterogeneity contrastive loss model.

[0016] Optionally, the spatiotemporal encoded vectors in the aforementioned spatiotemporal encoded vector sequence include multiple spatiotemporal encoded sub-vectors, and the enhanced spatiotemporal encoded vectors in the aforementioned enhanced spatiotemporal encoded vector sequence include multiple enhanced spatiotemporal encoded sub-vectors; and the generation of second loss information based on the aforementioned spatiotemporal encoded vector sequence, the aforementioned enhanced spatiotemporal encoded vector sequence, and the aforementioned initial temporal heterogeneity contrastive loss model includes: for each spatiotemporal encoded vector in the aforementioned spatiotemporal encoded vector sequence, performing the following fifth generation step: determining multiple spatiotemporal encoded sub-vectors corresponding to the aforementioned spatiotemporal encoded vector as multiple second target spatiotemporal encoded sub-vectors; for each second target spatiotemporal encoded sub-vector in the multiple second target spatiotemporal encoded sub-vectors, performing the following sixth generation step: determining the multiple spatiotemporal encoded sub-vectors corresponding to the aforementioned spatiotemporal encoded vectors as multiple second target spatiotemporal encoded sub-vectors. The second target spatiotemporal encoding vector has a regional correspondence and a time correspondence, and is a second enhanced spatiotemporal encoding sub-vector sequence in the above-mentioned enhanced spatiotemporal encoding vector sequence; based on the above-mentioned second target spatiotemporal encoding vector and the above-mentioned second enhanced spatiotemporal encoding sub-vector sequence, a feature fusion vector for the target sub-region and the target time is generated, wherein the above-mentioned target sub-region is the region corresponding to the above-mentioned second target spatiotemporal encoding vector, and the above-mentioned target time is the time corresponding to the above-mentioned second target spatiotemporal encoding vector; based on the obtained feature fusion vector set, a global representation vector for the target region is generated; based on the obtained global representation vector set for the target region and the obtained feature fusion vector set, the above-mentioned second loss information is generated using the above-mentioned initial temporal heterogeneity contrastive loss model.

[0017] Optionally, the aforementioned initial loss information generation model set includes: an initial spatiotemporal representation loss generation model; and the generation of at least one loss information based on at least one of the initial loss information generation model set included in the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial spatiotemporal data quality adjustment model, including: generating third loss information based on the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial spatiotemporal representation loss generation model.

[0018] Optionally, the aforementioned initial spatiotemporal representation loss generation model includes: an initial spatiotemporal data representation vector prediction model and an initial spatiotemporal representation vector loss generation model; and the generation of third loss information based on the aforementioned spatiotemporal encoded vector sequence, the aforementioned enhanced spatiotemporal encoded vector sequence, and the aforementioned initial spatiotemporal representation loss generation model includes: obtaining the actual spatiotemporal data representation vector sequence for the aforementioned spatiotemporal data sequence; inputting the aforementioned spatiotemporal encoded vector sequence and the aforementioned enhanced spatiotemporal encoded vector sequence into the aforementioned initial spatiotemporal data representation vector prediction model to output a predicted spatiotemporal data representation vector sequence and a predicted enhanced spatiotemporal data representation vector sequence; and generating the aforementioned third loss information using the aforementioned initial spatiotemporal representation vector loss generation model based on the aforementioned predicted spatiotemporal data representation vector sequence, the aforementioned predicted enhanced spatiotemporal data representation vector sequence, and the aforementioned actual spatiotemporal data representation vector sequence.

[0019] Optionally, the above-mentioned initial spatiotemporal data encoding model includes: at least one temporal dimension vector convolutional network model and at least one spatial dimension vector convolutional network model.

[0020] Secondly, some embodiments of this disclosure provide a model training apparatus, comprising: a first acquisition unit configured to acquire a spatiotemporal data sequence for a target region; a first input unit configured to input the spatiotemporal data sequence into an initial data temporal and spatial heterogeneity adjustment model included in an initial spatiotemporal data quality adjustment model, to output an enhanced spatiotemporal data sequence; a second input unit configured to input the spatiotemporal data sequence and the enhanced spatiotemporal data sequence into an initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model, to output a spatiotemporal encoding vector sequence and an enhanced spatiotemporal encoding vector sequence; a generation unit configured to generate at least one model set based on the spatiotemporal encoding vector sequence, the enhanced spatiotemporal encoding vector sequence, and the initial loss information included in the initial spatiotemporal data quality adjustment model, and generate at least one loss information; and a training unit configured to train the initial spatiotemporal data quality adjustment model based on the at least one loss information, to output a spatiotemporal data quality adjustment model.

[0021] Optionally, the aforementioned initial data temporal and spatial heterogeneity adjustment model includes: an initial temporal heterogeneity adjustment model; and the first input unit can be configured to: input each spatiotemporal data in the aforementioned spatiotemporal data sequence into the aforementioned initial temporal heterogeneity adjustment model to output the aforementioned enhanced spatiotemporal data.

[0022] Optionally, the spatiotemporal data in the aforementioned spatiotemporal data sequence includes multiple regional data; and the first input unit can be configured to: for each regional data corresponding to the aforementioned spatiotemporal data, using an initial temporal heterogeneity adjustment model, perform the following first generation step: obtain a regional temporal representation vector for the regional data; generate regional element probability information for the aforementioned regional data based on the aforementioned regional temporal representation vector and initial training model parameters; generate regional masking information for the aforementioned regional data based on the aforementioned regional element probability information; and generate enhanced spatiotemporal data for the aforementioned spatiotemporal data using the aforementioned initial spatiotemporal data temporal heterogeneity adjustment model and the obtained regional masking information set.

[0023] Optionally, the initial data temporal and spatial heterogeneity adjustment model includes: an initial inter-regional heterogeneity adjustment model; and the first input unit can be configured to: input each spatiotemporal data in the above spatiotemporal data sequence into the above initial inter-regional heterogeneity adjustment model to output the above enhanced spatiotemporal data.

[0024] Optionally, the spatiotemporal data in the aforementioned spatiotemporal data sequence includes multiple regional data; and the first input unit can be configured to: for each of the multiple regional data, using the aforementioned initial inter-regional heterogeneity adjustment model, perform the following second generation step: generate a regional global time representation vector for the aforementioned regional data as a target regional global time representation vector; determine sub-regions that have a positional proximity relationship with the sub-regions corresponding to the aforementioned regional data, and obtain at least one sub-region information; determine the regional global time representation vector corresponding to each of the at least one sub-region information, and use it as a neighboring regional global time representation vector, and obtain at least one neighboring regional global time representation vector; generate a regional dividing line masking information set for the aforementioned regional data based on the aforementioned target regional global time representation vector and the aforementioned at least one neighboring regional global time representation vector; and generate enhanced spatiotemporal data for the aforementioned spatiotemporal data based on the obtained regional dividing line masking information set and the aforementioned multiple regional data.

[0025] Optionally, the aforementioned initial loss information generation model set includes: an initial spatial heterogeneity contrastive loss generation model; and the generation unit can be configured to: generate first loss information based on the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial spatial heterogeneity contrastive loss generation model.

[0026] Optionally, the spatiotemporal encoded vectors in the above-mentioned spatiotemporal encoded vector sequence include multiple spatiotemporal encoded sub-vectors, and the enhanced spatiotemporal encoded vectors in the above-mentioned enhanced spatiotemporal encoded vector sequence include multiple enhanced spatiotemporal encoded sub-vectors; and the generation unit can be configured to: for each spatiotemporal encoded vector in the above-mentioned spatiotemporal encoded vector sequence, perform the following third generation step: determine multiple spatiotemporal encoded sub-vectors corresponding to the above-mentioned spatiotemporal encoded vector as multiple first target spatiotemporal encoded sub-vectors; for each of the above-mentioned multiple first target spatiotemporal encoded sub-vectors, perform the following fourth generation step: determine the first enhanced spatiotemporal encoded sub-vector sequence in the above-mentioned enhanced spatiotemporal encoded vector sequence that has a regional correspondence with the above-mentioned first target spatiotemporal encoded vector; obtain multiple initial clustering center vectors corresponding to the spatiotemporal data clustering algorithm; root Based on the aforementioned multiple initial cluster center vectors, a first clustering result is generated for each first enhanced spatiotemporal coding sub-vector in the aforementioned first enhanced spatiotemporal coding sub-vector sequence, resulting in a first clustering result sequence. Based on the aforementioned multiple initial cluster center vectors, a second clustering result is generated corresponding to the aforementioned first target spatiotemporal coding vector. Based on the aforementioned first clustering result sequence and the aforementioned second clustering result, clustering loss information for the first target spatiotemporal coding vector is generated using the aforementioned initial spatial heterogeneity contrastive loss generation model. Based on the obtained multiple clustering loss information, spatial heterogeneity loss information for the aforementioned spatiotemporal coding vector is generated using the aforementioned initial spatial heterogeneity contrastive loss generation model. Based on the obtained spatial heterogeneity loss information sequence, the aforementioned first loss information is generated using the aforementioned initial spatial heterogeneity contrastive loss generation model.

[0027] Optionally, the aforementioned initial loss information generation model set includes: an initial temporal heterogeneity contrastive loss model; and the generation unit can be configured to: generate second loss information based on the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial temporal heterogeneity contrastive loss model.

[0028] Optionally, the spatiotemporal encoded vectors in the above-mentioned spatiotemporal encoded vector sequence include multiple spatiotemporal encoded sub-vectors, and the enhanced spatiotemporal encoded vectors in the above-mentioned enhanced spatiotemporal encoded vector sequence include multiple enhanced spatiotemporal encoded sub-vectors; and the generation unit can be configured to: for each spatiotemporal encoded vector in the above-mentioned spatiotemporal encoded vector sequence, perform the following fifth generation step: determine multiple spatiotemporal encoded sub-vectors corresponding to the above-mentioned spatiotemporal encoded vector as multiple second target spatiotemporal encoded sub-vectors; for each second target spatiotemporal encoded sub-vector in the multiple second target spatiotemporal encoded sub-vectors, perform the following sixth generation step: determine the regional correspondence and time pair with the above-mentioned second target spatiotemporal encoded vector. The second enhanced spatiotemporal coding sub-vector sequence in the aforementioned enhanced spatiotemporal coding vector sequence is used as the relation; based on the aforementioned second target spatiotemporal coding vector and the aforementioned second enhanced spatiotemporal coding sub-vector sequence, a feature fusion vector for the target sub-region and the target time is generated, wherein the aforementioned target sub-region is the region corresponding to the aforementioned second target spatiotemporal coding vector, and the aforementioned target time is the time corresponding to the aforementioned second target spatiotemporal coding vector; based on the obtained feature fusion vector set, a global representation vector for the target region is generated; based on the obtained global representation vector set for the target region and the obtained feature fusion vector set, the aforementioned second loss information is generated using the aforementioned initial temporal heterogeneity contrastive loss model.

[0029] Optionally, the aforementioned initial loss information generation model set includes: an initial spatiotemporal representation loss generation model; and the generation unit can be configured to: generate third loss information based on the aforementioned spatiotemporal encoding vector sequence, the aforementioned enhanced spatiotemporal encoding vector sequence, and the aforementioned initial spatiotemporal representation loss generation model.

[0030] Optionally, the aforementioned initial spatiotemporal representation loss generation model includes: an initial spatiotemporal data representation vector prediction model and an initial spatiotemporal representation vector loss generation model; and the generation unit can be configured to: obtain the actual spatiotemporal data representation vector sequence for the aforementioned spatiotemporal data sequence; input the aforementioned spatiotemporal coding vector sequence and the aforementioned enhanced spatiotemporal coding vector sequence into the aforementioned initial spatiotemporal data representation vector prediction model to output the predicted spatiotemporal data representation vector sequence and the predicted enhanced spatiotemporal data representation vector sequence; and generate the aforementioned third loss information using the aforementioned initial spatiotemporal representation vector loss generation model based on the aforementioned predicted spatiotemporal data representation vector sequence, the aforementioned predicted enhanced spatiotemporal data representation vector sequence, and the aforementioned actual spatiotemporal data representation vector sequence.

[0031] Optionally, the above-mentioned initial spatiotemporal data encoding model includes: at least one temporal dimension vector convolutional network model and at least one spatial dimension vector convolutional network model.

[0032] Thirdly, some embodiments of this disclosure provide a data adjustment method, including: acquiring target spatiotemporal data; inputting the target spatiotemporal data into a spatiotemporal data quality adjustment model to output adjusted spatiotemporal data, wherein the spatiotemporal data quality adjustment model is generated based on the method described in the first aspect of this disclosure.

[0033] Fourthly, some embodiments of this disclosure provide a data adjustment apparatus, including: a second acquisition unit configured to acquire target spatiotemporal data; and a third input unit configured to input the target spatiotemporal data into a spatiotemporal data quality adjustment model to output adjusted spatiotemporal data, wherein the spatiotemporal data quality adjustment model is generated based on the method described in the first aspect of this disclosure.

[0034] Fifthly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any of the implementations of the first and third aspects.

[0035] Sixthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as described in any of the implementations of the first and third aspects.

[0036] In a seventh aspect, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the implementations of the first and third aspects above.

[0037] The above embodiments of this disclosure have the following beneficial effects: by using the spatiotemporal data quality adjustment model through the model training method of some embodiments of this disclosure, more accurate and high-quality spatiotemporal data can be generated. Specifically, the reason for insufficient accuracy in spatiotemporal data processing is that the spatiotemporal characteristics of the spatiotemporal data are not specifically adjusted, resulting in insufficient accuracy in the quality of the adjusted spatiotemporal data. Based on this, the model training method of some embodiments of this disclosure firstly acquires a spatiotemporal data sequence for a target region as a training data sequence for subsequent training of the initial spatiotemporal data quality adjustment model. Here, multiple spatiotemporal data with temporal characteristics are selected so that the subsequent initial spatiotemporal data quality adjustment model can learn the temporal heterogeneity features and spatial heterogeneity features between the multiple spatiotemporal data. Then, the above spatiotemporal data sequence is input into the initial data temporal and spatial heterogeneity adjustment model included in the initial spatiotemporal data quality adjustment model to output an enhanced spatiotemporal data sequence. Here, an initial data temporal and spatial heterogeneity adjustment model is used to adjust the temporal and spatial heterogeneity of each spatiotemporal data point in the spatiotemporal data sequence. This adjustment is used to generate at least one loss information point, thereby enabling more accurate training of the initial spatiotemporal data quality adjustment model. Next, the aforementioned spatiotemporal data sequence and the enhanced spatiotemporal data sequence are input into the initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model, outputting a spatiotemporal encoded vector sequence and an enhanced spatiotemporal encoded vector sequence. Here, by encoding the spatiotemporal data sequence and the enhanced spatiotemporal data sequence, spatiotemporal feature information is represented in a vectorized form, and at least one loss information point is generated. Furthermore, based on the aforementioned spatiotemporal encoded vector sequence, the enhanced spatiotemporal encoded vector sequence, and the initial loss information point included in the initial spatiotemporal data quality adjustment model, at least one model in the model set can be generated accurately. Here, by generating at least one model in the model set using the initial loss information, at least one loss information point can be generated from at least one loss difference aspect, making the subsequent training of the initial spatiotemporal data quality adjustment model more accurate. Finally, based on at least one of the aforementioned loss information, the initial spatiotemporal data quality adjustment model is trained to output the spatiotemporal data quality adjustment model. In summary, by utilizing at least one of the following models from the initial data temporal and spatial heterogeneity adjustment model set—data augmentation from the initial spatiotemporal data encoding model, data encoding from the initial spatiotemporal data encoding model, and initial loss information generation model set—to generate at least one loss information, a spatiotemporal data quality adjustment model that effectively and accurately adjusts spatiotemporal data based on temporal and spatial heterogeneity can be obtained. Attached Figure Description

[0038] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0039] Figure 1 This is a schematic diagram illustrating an application scenario of a model training method according to some embodiments of the present disclosure;

[0040] Figure 2 This is a flowchart of some embodiments of the model training method according to this disclosure;

[0041] Figure 3 These are flowcharts of other embodiments of the model training method according to this disclosure;

[0042] Figure 4 These are flowcharts of some embodiments of the data adjustment method according to this disclosure;

[0043] Figure 5 These are schematic diagrams illustrating the structure of some embodiments of the model training apparatus according to this disclosure;

[0044] Figure 6 These are schematic diagrams illustrating the structure of some embodiments of the data adjustment device according to this disclosure;

[0045] Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0046] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0047] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0048] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0049] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0050] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0051] Before performing any of the operations involving the collection, storage, or use of data (e.g., spatiotemporal data) disclosed herein, the relevant organizations or individuals shall fulfill their obligations, including conducting data security impact assessments, informing data subjects, and obtaining prior authorization and consent from data subjects.

[0052] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0053] Figure 1 This is a schematic diagram illustrating an application scenario of a model training method according to some embodiments of the present disclosure.

[0054] exist Figure 1 In the application scenario, firstly, electronic device 101 can acquire a spatiotemporal data sequence 102 for a target region. Then, electronic device 101 can input the spatiotemporal data sequence 102 into the initial data temporal and spatial heterogeneity adjustment model 104 included in the initial spatiotemporal data quality adjustment model 103 to output an enhanced spatiotemporal data sequence 106. Next, electronic device 101 can input the spatiotemporal data sequence 102 and the enhanced spatiotemporal data sequence 106 into the initial spatiotemporal data encoding model 105 included in the initial spatiotemporal data quality adjustment model 103 to output a spatiotemporal encoded vector sequence 107 and an enhanced spatiotemporal encoded vector sequence 108. Furthermore, electronic device 101 can generate at least one loss information 110 based on at least one of the spatiotemporal encoded vector sequence 107, the enhanced spatiotemporal encoded vector sequence 108, and the initial loss information generation model set 109 included in the initial spatiotemporal data quality adjustment model 103. In this application scenario, the initial loss information generation model set 109 includes: initial loss information generation model 1091, initial loss information generation model 1092, and initial loss information generation model 1093. Finally, based on at least one loss information 110, the initial spatiotemporal data quality adjustment model 103 is trained to output a spatiotemporal data quality adjustment model.

[0055] It should be noted that the aforementioned electronic device 101 can be either hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the electronic device is software, it can be installed in the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0056] It should be understood that Figure 1 The number of electronic devices shown is merely illustrative. Any number of electronic devices can be used depending on the implementation requirements.

[0057] Continue to refer to Figure 2 The diagram illustrates a flow 200 of some embodiments of a model training method according to the present disclosure. This model training method includes the following steps:

[0058] Step 201: Obtain the spatiotemporal data sequence for the target region.

[0059] In some embodiments, the execution entity of the above model training method (e.g. Figure 1 The electronic device 101 shown can acquire spatiotemporal data sequences for a target area via wired or wireless connection. The target area can be a spatiotemporal data acquisition area. The spatiotemporal data sequence can be a historical data sequence of the target area occurring within a historical time series. In practice, the spatiotemporal data can be historical spatiotemporal traffic data of the target area. For example, historical spatiotemporal traffic data can be historical vehicle traffic flow change data or historical pedestrian traffic flow change data of the target area.

[0060] Step 202: Input the above spatiotemporal data sequence into the initial data temporal and spatial heterogeneity adjustment model included in the initial spatiotemporal data quality adjustment model to output an enhanced spatiotemporal data sequence.

[0061] In some embodiments, the aforementioned execution entity can input the spatiotemporal data sequence into the initial data temporal and spatial heterogeneity adjustment model included in the initial spatiotemporal data quality adjustment model to output an enhanced spatiotemporal data sequence. The initial spatiotemporal data quality adjustment model can be a spatiotemporal data quality adjustment model whose model parameters have not yet been fully trained. The spatiotemporal data quality adjustment model can be a model that adjusts the quality of spatiotemporal data. In practice, the aforementioned spatiotemporal data quality adjustment model can be multiple multi-head attention mechanism models. For example, the spatiotemporal data quality adjustment model can be multiple Transformer models. The initial data temporal and spatial heterogeneity adjustment model can be a model whose model parameters have not yet been fully trained, enhancing the spatial heterogeneity between various spatiotemporal data points in the spatiotemporal data sequence. For example, the initial data temporal and spatial heterogeneity adjustment model can be a multi-head attention mechanism model.

[0062] In some optional implementations of certain embodiments, the aforementioned initial data temporal and spatial heterogeneity adjustment model includes: an initial inter-regional heterogeneity adjustment model. This initial inter-regional heterogeneity adjustment model can be a model whose parameters have not yet been fully trained, adjusting the inter-regional heterogeneity features of the data corresponding to each sub-region of the spatiotemporal data. Using the inter-regional heterogeneity adjustment model, the edges between two adjacent regions with high heterogeneity can be masked to re-divide the regions. For example, the initial inter-regional heterogeneity adjustment model can be a multi-head attention mechanism model.

[0063] Optionally, the aforementioned execution entity may input each spatiotemporal data in the aforementioned spatiotemporal data sequence into the aforementioned initial interregional heterogeneity adjustment model to output enhanced spatiotemporal data.

[0064] Optionally, the spatiotemporal data in the above spatiotemporal data sequence includes multiple regional data. There is a one-to-one correspondence between the regional data and the sub-regions within the multiple sub-regions.

[0065] Optionally, inputting each spatiotemporal data point in the aforementioned spatiotemporal data sequence into the aforementioned initial inter-regional heterogeneity adjustment model to output the aforementioned enhanced spatiotemporal data may include the following steps:

[0066] The first step, for each of the aforementioned regional data sets, utilizes the initial inter-regional heterogeneity adjustment model to perform the following second generation step:

[0067] Sub-step 1 generates a global temporal representation vector for the aforementioned regional data, serving as the global temporal representation vector for the target region. This target region global temporal representation vector represents the global feature characteristics of the corresponding sub-region of the aforementioned regional data within the temporal information sequence corresponding to the spatiotemporal data sequence. There is a one-to-one correspondence between the spatiotemporal data in the spatiotemporal data sequence and the temporal information in the temporal information sequence. The temporal information can be the actual time when the corresponding spatiotemporal data occurs.

[0068] As an example, the aforementioned execution entity can generate a global time representation vector using the following formula:

[0069]

[0070] Where T is the number of time information segments included in the time information sequence. t can be the latest time segment in the time information sequence. tT can be the earliest time segment in the time information sequence. n can be the sub-region corresponding to the regional data. b τ,n It can be a regional time representation vector (i.e., the corresponding spatiotemporal encoded sub-vector) when the time information is τ and the sub-region is n. τ,n This can be the probability information of region elements when the time information is τ and the sub-region is n. The probability information of region elements can characterize the spatial heterogeneity of each element in the sub-region at a certain time information. n It can be the global time representation vector when the sub-region is n.

[0071] Sub-step 2: Determine the sub-regions that are geographically adjacent to the sub-regions corresponding to the above-mentioned regional data, and obtain at least one sub-region information.

[0072] Sub-step 3: Determine the regional global time representation vector corresponding to each of the above at least one sub-region information as the global time representation vector of the neighboring region, and obtain at least one global time representation vector of the neighboring region.

[0073] Sub-step 4 involves generating a set of region partitioning masking information for the aforementioned region data, based on the global temporal representation vector of the target region and the global temporal representation vector of at least one neighboring region. This region partitioning masking information indicates whether the corresponding region partitioning lines of the region data should be adjusted to mitigate spatial heterogeneity. The greater the region partitioning masking information, the more likely the corresponding region partitioning lines should be adjusted.

[0074] In practice, for each of the aforementioned neighboring region global time representation vectors, the region demarcation line masking information between the target region global time representation vector and the neighboring region global time representation vectors is determined using the following formula:

[0075]

[0076] Where m is the sub-region corresponding to the global time representation vector of the neighboring region. q m,n This could be the masking information of the region demarcation line between sub-regions m and n. m It can be the global time representation vector when the sub-region is m.

[0077] The second step is to generate enhanced spatiotemporal data for the aforementioned spatiotemporal data based on the obtained regional division line masking information set and the data from the multiple regions mentioned above.

[0078] As an example, the aforementioned execution entity can adjust the regional division lines of each region based on the information set group masked by the regional division lines to generate an adjusted set of division lines. Then, based on the adjusted set of division lines, the target region is re-divided to obtain a set of sub-regions. Finally, based on data from multiple regions, a dataset of sub-regions is generated for the aforementioned set of sub-regions, serving as augmented spatiotemporal data.

[0079] Step 203: Input the above-mentioned spatiotemporal data sequence and the above-mentioned enhanced spatiotemporal data sequence into the initial spatiotemporal data encoding model included in the above-mentioned initial spatiotemporal data quality adjustment model, so as to output the spatiotemporal encoding vector sequence and the enhanced spatiotemporal encoding vector sequence.

[0080] In some embodiments, the execution entity may input the aforementioned spatiotemporal data sequence and the aforementioned enhanced spatiotemporal data sequence into the initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model, to output a spatiotemporal encoded vector sequence and an enhanced spatiotemporal encoded vector sequence. The initial spatiotemporal data encoding model may be a spatiotemporal data encoding model whose model parameters have not yet been fully trained. The spatiotemporal data encoding model may be a model that encodes spatiotemporal data. For example, the spatiotemporal data encoding model may be a Transformer encoding model.

[0081] In some optional implementations of certain embodiments, the aforementioned initial spatiotemporal data encoding model includes: at least one temporal-dimensional vector convolutional network model and at least one spatial-dimensional vector convolutional network model. The temporal-dimensional vector convolutional network model can be a convolutional network model that performs convolution processing in the temporal dimension. In practice, the temporal-dimensional vector convolutional network model can be, but is not limited to, one of the following: RNN (Recurrent Neural Network), 1D Conv (One-Dimensional Convolutional Network), or TCN (Temporal Convolutional Network). The spatial-dimensional vector convolutional network model can be a convolutional network model that performs convolution processing in the spatial dimension. In practice, the spatial-dimensional vector convolutional network model can be one of the following: Spatial Convolutional Network (SCN, Spectral-based GCN), or Graph Convolutional Neural Networks (GCNNs).

[0082] It should be noted that the initial spatiotemporal data encoding model includes at least one combined convolutional network model. This combined convolutional network model can include both a temporal dimension vector convolutional network model and a spatial dimension vector convolutional network model. The specific model structure of the initial spatiotemporal data encoding model can be dynamically adjusted according to the actual scenario.

[0083] Step 204: Generate at least one loss information based on at least one of the following in the model set: the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial loss information generated by the initial spatiotemporal data quality adjustment model.

[0084] In some embodiments, the execution entity may generate at least one loss information based on at least one of the spatiotemporal encoding vector sequence, the enhanced spatiotemporal encoding vector sequence, and the initial loss information generation model set included in the initial spatiotemporal data quality adjustment model. The initial loss information generation model in the initial loss information generation model set may be a model whose model parameters have not yet been fully trained and is used to generate the loss information. In practice, the initial loss information generation model may be one of the following: a fully connected network with a mean squared error loss function, a mean squared error loss function, a cross-entropy error loss function, or a logarithmic loss function.

[0085] As an example, the aforementioned execution entity can directly input the aforementioned spatiotemporal encoded vector sequence and the aforementioned enhanced spatiotemporal encoded vector sequence into at least one of the initial loss information generation model sets to generate at least one loss information.

[0086] In some optional implementations of certain embodiments, the aforementioned initial loss information generation model set includes: an initial spatial heterogeneity contrastive loss generation model. This initial spatial heterogeneity contrastive loss generation model can be a spatial heterogeneity contrastive loss generation model where the model parameters have not yet been fully trained. This spatial heterogeneity contrastive loss generation model can be a model that generates spatial heterogeneity contrastive loss information. This spatial heterogeneity contrastive loss information can characterize the spatial heterogeneity gap information between the spatiotemporal encoding vector and the corresponding augmented spatiotemporal vector. In practice, the aforementioned spatial heterogeneity contrastive loss generation model can be a multi-head attention mechanism model based on spatial heterogeneity.

[0087] Optionally, first loss information is generated based on the above-mentioned spatiotemporal coding vector sequence, the above-mentioned enhanced spatiotemporal coding vector sequence, and the above-mentioned initial spatial heterogeneity contrastive loss generation model.

[0088] As an example, the aforementioned execution entity can input the spatiotemporal encoded vector sequence and the aforementioned enhanced spatiotemporal encoded vector sequence into the aforementioned initial spatial heterogeneity contrast loss generation model to generate the first loss information.

[0089] Optionally, the spatiotemporal coding vector sequence described above includes multiple spatiotemporal coding sub-vectors. The enhanced spatiotemporal coding vector sequence described above includes multiple enhanced spatiotemporal coding sub-vectors. The target region includes multiple sub-regions. The spatiotemporal coding vector is a coding vector specific to the target region. Similarly, the enhanced spatiotemporal coding sub-vector is a coding vector corresponding to the enhanced spatiotemporal data of the target region.

[0090] Optionally, the execution entity can generate first loss information based on the spatiotemporal encoded vector sequence, the enhanced spatiotemporal encoded vector sequence, and the initial spatial heterogeneity contrastive loss generation model, which may include the following steps:

[0091] First, for each spatiotemporal encoded vector in the above spatiotemporal encoded vector sequence, perform the following third generation step:

[0092] Step 1: Determine multiple spatiotemporal coding sub-vectors corresponding to the above spatiotemporal coding vectors, and use them as multiple first target spatiotemporal coding sub-vectors.

[0093] Step 2: For each of the multiple first target spatiotemporal coding sub-vectors mentioned above, perform the following fourth generation step:

[0094] The first sub-step involves determining the first enhanced spatiotemporal coding sub-vector sequence in the enhanced spatiotemporal coding vector sequence that has a regional correspondence with the aforementioned first target spatiotemporal coding vector.

[0095] Among them, the sub-region corresponding to the first enhanced spatiotemporal coding sub-vector in the first enhanced spatiotemporal coding sub-vector sequence is the same region as the sub-region corresponding to the first target spatiotemporal coding vector.

[0096] The second sub-step involves obtaining multiple initial cluster center vectors corresponding to the spatiotemporal data clustering algorithm.

[0097] Spatiotemporal data clustering algorithms can be algorithms that cluster data from multiple regions within a spatiotemporal dataset. In practice, spatiotemporal data clustering algorithms can be based on various features of the regional data for clustering. The specific clustering process of a spatiotemporal data clustering algorithm can be dynamically changed according to the actual scenario. For example, a spatiotemporal data clustering algorithm could be a k-means clustering algorithm. Each of the multiple initial cluster center vectors mentioned above is the cluster center of multiple predetermined clusters. The initial cluster center vectors represent the category information corresponding to the regional data. During the training process of the initial spatiotemporal data quality adjustment model, the vector values ​​corresponding to the multiple initial cluster center vectors are continuously changing.

[0098] The third sub-step involves generating the first clustering result corresponding to each of the first enhanced spatiotemporal coding sub-vectors in the first enhanced spatiotemporal coding sub-vector sequence based on the multiple initial clustering center vectors mentioned above, thus obtaining the first clustering result sequence.

[0099] As an example, for each first enhanced spatiotemporal encoded subvector, firstly, the vector product between the first enhanced spatiotemporal encoded subvector and multiple initial cluster center vectors is determined, resulting in a set of multiplication results. Then, the initial cluster center vector with the largest corresponding multiplication result among the multiple initial cluster center vectors is determined as the target cluster center vector. Finally, the cluster information corresponding to the target cluster center vector is determined as the first clustering result corresponding to the first enhanced spatiotemporal encoded subvector.

[0100] The fourth sub-step involves generating the second clustering result corresponding to the first target spatiotemporal encoding vector based on the multiple initial clustering center vectors mentioned above.

[0101] The method for determining the second clustering result can refer to the method for generating the first clustering result, and will not be repeated here.

[0102] The fifth sub-step involves generating clustering loss information for the first target spatiotemporal encoding vector based on the first clustering result sequence and the second clustering result, using the initial spatial heterogeneity contrast loss generation model.

[0103] As an example, firstly, for each first clustering result in the aforementioned first clustering result sequence, the aforementioned execution entity can input the aforementioned second clustering result and the first clustering result into the initial spatial heterogeneity contrast loss generation model to output clustering loss sub-information. Then, the obtained clustering loss sub-information is added together to obtain the clustering loss information.

[0104] The initial spatial heterogeneity contrastive loss generation model can be represented by the following formula:

[0105]

[0106] Where L can be the clustering loss sub-information, and k is the number of initial cluster center vectors. It can be the first clustering result in the sub-region n, corresponding to the k-th initial cluster center vector. It can be the second clustering result in subregion n, corresponding to the k-th initial cluster center vector. γ is a learnable parameter. It can be the second clustering result in subregion n, corresponding to the j-th initial cluster center vector.

[0107] Step 3: Based on the obtained clustering loss information, use the above-mentioned initial spatial heterogeneity contrastive loss generation model to generate spatial heterogeneity loss information for the above-mentioned spatiotemporal encoding vector.

[0108] As an example, the aforementioned execution entity can use the aforementioned initial spatial heterogeneity contrast loss generation model to add the aforementioned multiple clustering loss information to obtain spatial heterogeneity loss information.

[0109] The second step is to generate the first loss information based on the obtained spatial heterogeneity loss information sequence and the aforementioned initial spatial heterogeneity contrast loss generation model.

[0110] As an example, the aforementioned execution entity can use the aforementioned initial spatial heterogeneity contrast loss generation model to add up the various spatial heterogeneity loss information in the spatial heterogeneity loss information sequence to obtain the first loss information.

[0111] In some optional implementations of certain embodiments, the aforementioned initial loss information generation model set includes: an initial temporal heterogeneity contrastive loss model. This initial temporal heterogeneity contrastive loss model can be a temporal heterogeneity contrastive loss model where the model parameters have not yet been fully trained. The temporal heterogeneity contrastive loss model can be a model that determines temporal heterogeneity contrastive loss information. This temporal heterogeneity contrastive loss information can characterize the temporal heterogeneity gap information between the spatiotemporal encoding vector and the corresponding augmented spatiotemporal vector. In practice, the temporal heterogeneity contrastive loss model can be a multi-head attention mechanism model based on temporal heterogeneity.

[0112] Optionally, the execution entity can generate second loss information based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial temporal heterogeneity contrastive loss model.

[0113] As an example, the aforementioned execution entity can input the aforementioned spatiotemporal encoded vector sequence and the aforementioned enhanced spatiotemporal encoded vector sequence into the aforementioned initial temporal heterogeneity contrastive loss model to generate second loss information.

[0114] Optionally, the spatiotemporal coding vector in the above spatiotemporal coding vector sequence includes multiple spatiotemporal coding sub-vectors, and the enhanced spatiotemporal coding vector in the above enhanced spatiotemporal coding vector sequence includes multiple enhanced spatiotemporal coding sub-vectors.

[0115] Optionally, the aforementioned execution entity can generate second loss information based on the aforementioned spatiotemporal coding vector sequence, the aforementioned enhanced spatiotemporal coding vector sequence, and the aforementioned initial temporal heterogeneity contrastive loss model, including:

[0116] First, for each spatiotemporal encoded vector in the above spatiotemporal encoded vector sequence, perform the following fifth generation step:

[0117] Sub-step 1: Determine multiple spatiotemporal coding sub-vectors corresponding to the above spatiotemporal coding vectors, and use them as multiple second target spatiotemporal coding sub-vectors.

[0118] Sub-step 2: For each of the multiple second target spatiotemporal coding sub-vectors, perform the following sixth generation step:

[0119] The first sub-step involves determining the second enhanced spatiotemporal coding sub-vector sequence in the aforementioned enhanced spatiotemporal coding vector sequence that has a regional and temporal correspondence with the aforementioned second target spatiotemporal coding vector.

[0120] Among them, the second enhanced spatiotemporal coding sub-vector in the second enhanced spatiotemporal coding sub-vector sequence has the same region as the second target spatiotemporal coding vector, and the corresponding time information (i.e., time step) is the same.

[0121] The second sub-step involves generating a feature fusion vector targeting the target sub-region and the target time based on the aforementioned second target spatiotemporal encoding vector and the aforementioned second enhanced spatiotemporal encoding sub-vector sequence. Here, the target sub-region is the region corresponding to the aforementioned second target spatiotemporal encoding vector, and the target time is the time corresponding to the aforementioned second target spatiotemporal encoding vector.

[0122] As an example, the aforementioned execution entity can multiply the second target spatiotemporal encoding vector by the first learnable parameter to obtain the first parameter multiplication result. Then, each of the second enhanced spatiotemporal encoding sub-vectors in the second enhanced spatiotemporal encoding sub-vector sequence is multiplied by the second learnable parameter to generate the second parameter multiplication result, resulting in a second parameter multiplication result set. Finally, the corresponding results of the first parameter multiplication and the aforementioned second parameter multiplication result set are added together to obtain the summed result, which serves as the feature fusion vector.

[0123] Sub-step 3 involves generating a global representation vector for the target region based on the obtained feature fusion vector set. This global representation vector represents the global feature information of the target region at the time corresponding to the spatiotemporal encoding vector.

[0124] As an example, the aforementioned execution entity can first perform a weighted summation on the feature fusion vector set to generate a weighted sum vector. Then, the weighted sum vector is input into the target activation function to output a global representation vector of the target region. In practice, the target activation function can be the sigmoid function.

[0125] The second step involves generating the second loss information based on the obtained global representation vector set of the target region and the obtained feature fusion vector set, using the aforementioned initial temporal heterogeneity contrastive loss model.

[0126] In practice, the aforementioned executing entity can form positive vector pairs by pairing two vectors in the target region global representation vector set that correspond to the same time information (i.e., time step) as the target region global representation vector and the feature fusion vector in the feature fusion vector set, and form negative vector pairs by pairing two vectors in the target region global representation vector set that correspond to different time information (i.e., time step) as the target region global representation vector and the feature fusion vector in the feature fusion vector set, so as to obtain a set of positive vector pairs and a set of negative vector pairs.

[0127] As an example, firstly, for each piece of time information, the aforementioned execution entity can input the global representation vector of the target region corresponding to the time information and each feature fusion vector in the feature fusion vector set into the initial temporal heterogeneity contrastive loss model to output temporal heterogeneity contrastive loss information. Then, the obtained temporal heterogeneity contrastive loss information sets for each piece of time information are weighted and summed to obtain the second loss information.

[0128] In practice, the temporal heterogeneity contrastive loss model can be represented by the following formula:

[0129]

[0130] Among them, L t This could be temporal heterogeneity comparison loss information at time t.t,n It can be the feature fusion vector when the sub-region is n at time t. t It can be the global representation vector of the target region at time t. t′ , where n can be the feature fusion vector when the subregion is n at time t′.

[0131]

[0132] Where W3 is a learnable parameter, and σ is the sigmoid function.

[0133] In some optional implementations of certain embodiments, the aforementioned set of initial loss information generation models includes: an initial spatiotemporal representation loss generation model. This initial spatiotemporal representation loss generation model can be a model whose parameters have not yet been fully trained, which generates spatiotemporal representation loss information. The spatiotemporal representation loss information can characterize the overall difference between a spatiotemporal data sequence and a real spatiotemporal data sequence. In practice, the spatiotemporal representation loss generation model can be a multi-head attention mechanism model.

[0134] Optionally, the aforementioned execution entity can generate third loss information based on the aforementioned spatiotemporal encoding vector sequence, the aforementioned enhanced spatiotemporal encoding vector sequence, and the aforementioned initial spatiotemporal representation loss generation model.

[0135] As an example, the aforementioned execution entity can input at least one of the aforementioned spatiotemporal encoded vector sequence and the aforementioned enhanced spatiotemporal encoded vector sequence into the aforementioned initial spatiotemporal representation loss generation model to output third loss information.

[0136] Optionally, the aforementioned initial spatiotemporal representation loss generation model includes: an initial spatiotemporal data representation vector prediction model and an initial spatiotemporal representation vector loss generation model. The initial spatiotemporal data representation vector prediction model can be a model whose parameters have not been fully trained and is used to generate spatiotemporal data representation vectors. The spatiotemporal data representation vectors can represent the data feature information of spatiotemporal data. The aforementioned initial spatiotemporal representation vector loss generation model can also be a model whose model parameters have not been fully trained and is used to generate temporal representation vector loss information. The temporal representation vector loss information can represent the feature difference information between the spatiotemporal data representation vectors generated by the spatiotemporal data representation vector prediction model and the actual spatiotemporal data representation vectors. In practice, the spatiotemporal data representation vector prediction model can be a Support Vector Machine (SVM) model.

[0137] Optionally, the process of generating third loss information based on the aforementioned spatiotemporal encoded vector sequence, the aforementioned enhanced spatiotemporal encoded vector sequence, and the aforementioned initial spatiotemporal representation loss generation model may include the following steps:

[0138] The first step is to obtain the actual spatiotemporal data representation vector sequence for the above spatiotemporal data sequence. The actual spatiotemporal data representation vectors in the actual spatiotemporal data representation vector sequence can be pre-generated real spatiotemporal data representation vectors.

[0139] The second step involves inputting the aforementioned spatiotemporal coding vector sequence and the aforementioned enhanced spatiotemporal coding vector sequence into the aforementioned initial spatiotemporal data representation vector prediction model to output the predicted spatiotemporal data representation vector sequence and the predicted enhanced spatiotemporal data representation vector sequence.

[0140] The third step involves generating the third loss information based on the predicted spatiotemporal data representation vector sequence, the predicted enhanced spatiotemporal data representation vector sequence, and the actual spatiotemporal data representation vector sequence, using the initial spatiotemporal representation vector loss generation model.

[0141] As an example, the aforementioned execution entity can input the aforementioned predicted spatiotemporal data representation vector sequence, the aforementioned predicted enhanced spatiotemporal data representation vector sequence, and the aforementioned actual spatiotemporal data representation vector sequence into the aforementioned initial spatiotemporal representation vector loss generation model to generate the aforementioned third loss information.

[0142] Step 205: Based on at least one of the above loss information, train the above initial spatiotemporal data quality adjustment model to output the spatiotemporal data quality adjustment model.

[0143] In some embodiments, the aforementioned execution entity may train the aforementioned initial spatiotemporal data quality adjustment model based on at least one loss information to output the spatiotemporal data quality adjustment model.

[0144] As an example, firstly, the aforementioned executing entity can perform a weighted summation of at least one loss information to obtain weighted loss information. Then, in response to determining that the weighted loss information is less than a predetermined loss value, the aforementioned initial spatiotemporal data quality adjustment model is determined as the aforementioned spatiotemporal data quality adjustment model. Finally, in response to determining that the weighted loss information is greater than or equal to the predetermined loss value, the learnable parameters in the aforementioned initial spatiotemporal data quality adjustment model are updated to obtain the spatiotemporal data quality adjustment model.

[0145] The above embodiments of this disclosure have the following beneficial effects: by using the spatiotemporal data quality adjustment model through the model training method of some embodiments of this disclosure, more accurate and high-quality spatiotemporal data can be generated. Specifically, the reason for insufficient accuracy in spatiotemporal data processing is that the spatiotemporal characteristics of the spatiotemporal data are not specifically adjusted, resulting in insufficient accuracy in the quality of the adjusted spatiotemporal data. Based on this, the model training method of some embodiments of this disclosure firstly acquires a spatiotemporal data sequence for a target region as a training data sequence for subsequent training of the initial spatiotemporal data quality adjustment model. Here, multiple spatiotemporal data with temporal characteristics are selected so that the subsequent initial spatiotemporal data quality adjustment model can learn the temporal heterogeneity features and spatial heterogeneity features between the multiple spatiotemporal data. Then, the above spatiotemporal data sequence is input into the initial data temporal and spatial heterogeneity adjustment model included in the initial spatiotemporal data quality adjustment model to output an enhanced spatiotemporal data sequence. Here, an initial data temporal and spatial heterogeneity adjustment model is used to adjust the temporal and spatial heterogeneity of each spatiotemporal data point in the spatiotemporal data sequence. This adjustment is used to generate at least one loss information point, thereby enabling more accurate training of the initial spatiotemporal data quality adjustment model. Next, the aforementioned spatiotemporal data sequence and the enhanced spatiotemporal data sequence are input into the initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model, outputting a spatiotemporal encoded vector sequence and an enhanced spatiotemporal encoded vector sequence. Here, by encoding the spatiotemporal data sequence and the enhanced spatiotemporal data sequence, spatiotemporal feature information is represented in a vectorized form, and at least one loss information point is generated. Furthermore, based on the aforementioned spatiotemporal encoded vector sequence, the enhanced spatiotemporal encoded vector sequence, and the initial loss information point included in the initial spatiotemporal data quality adjustment model, at least one model in the model set can be generated accurately. Here, by generating at least one model in the model set using the initial loss information, at least one loss information point can be generated from at least one loss difference aspect, making the subsequent training of the initial spatiotemporal data quality adjustment model more accurate. Finally, based on at least one of the aforementioned loss information, the initial spatiotemporal data quality adjustment model is trained to output the spatiotemporal data quality adjustment model. In summary, by utilizing at least one of the following models from the initial data temporal and spatial heterogeneity adjustment model set—data augmentation from the initial spatiotemporal data encoding model, data encoding from the initial spatiotemporal data encoding model, and initial loss information generation model set—to generate at least one loss information, a spatiotemporal data quality adjustment model that effectively and accurately adjusts spatiotemporal data based on temporal and spatial heterogeneity can be obtained.

[0146] Further reference Figure 3 The diagram illustrates flow 300 of some other embodiments of the model training method according to this disclosure. This model training method includes the following steps:

[0147] Step 301: Obtain the spatiotemporal data sequence for the target region.

[0148] Step 302: Input each spatiotemporal data in the above spatiotemporal data sequence into the above initial temporal heterogeneity adjustment model to output the above enhanced spatiotemporal data.

[0149] In some embodiments, the executing entity (e.g. Figure 1 The electronic device 101 shown can input each spatiotemporal data in the above-mentioned spatiotemporal data sequence into the above-mentioned initial temporal heterogeneity adjustment model to output the above-mentioned enhanced spatiotemporal data. The above-mentioned initial data temporal and spatial heterogeneity adjustment model includes: an initial temporal heterogeneity adjustment model.

[0150] The aforementioned initial temporal heterogeneity adjustment model can be a model whose parameters have not yet been fully trained, adjusting the temporal heterogeneity features between the data in each region's data sequence. Each region's data sequence can correspond to a spatiotemporal data sequence. Using the temporal heterogeneity adjustment model, data adjustment can be performed between two adjacent regions with high heterogeneity; for example, the initial inter-regional heterogeneity adjustment model could be a multi-head attention mechanism model.

[0151] In some optional implementations of certain embodiments, the spatiotemporal data in the aforementioned spatiotemporal data sequence includes multiple regional data. There is a one-to-one correspondence between the regional data and the sub-regions within the multiple sub-regions.

[0152] Optionally, inputting each spatiotemporal data point in the aforementioned spatiotemporal data sequence into the aforementioned initial temporal heterogeneity adjustment model to output the aforementioned enhanced spatiotemporal data may include the following steps:

[0153] The first step, for each region data corresponding to the above spatiotemporal data, is to adjust the model using the initial temporal heterogeneity and perform the following first generation step:

[0154] Sub-step 1: Obtain the regional time representation vector for the regional data.

[0155] Among them, the regional time representation vector can be the spatiotemporal coding sub-vector corresponding to the sub-region of the regional data.

[0156] Sub-step 2 involves generating region element probability information for the aforementioned region data based on the region time representation vector and the initial training model parameters. This region element probability information can be the probability information corresponding to each element in the sub-regions of the region data. Each probability information represents the strength of the spatial heterogeneity of the corresponding element.

[0157] As an example, the aforementioned execution entity can multiply the aforementioned regional time representation vector and the parameters of the initial training model to obtain the multiplication result, which can be used as the probability information of the regional elements.

[0158] Sub-step 3 involves generating region masking information for the aforementioned region data based on the probability information of the region elements described above. This region masking information indicates whether or not to mask individual elements within the region data.

[0159] As an example, firstly, the aforementioned execution entity can obtain a subtraction result set by subtracting the probability of each element in the region element probability information from the target value. Then, based on the Bernoulli distribution and the subtraction result set, it generates region masking information for the corresponding sub-regions of the aforementioned region data. For example, the subtraction result set can be adjusted to satisfy the Bernoulli distribution, and the adjusted subtraction result set can be determined as the masking information.

[0160] The second step involves using the aforementioned initial spatiotemporal data temporal heterogeneity adjustment model to generate enhanced spatiotemporal data based on the obtained regional occlusion information set.

[0161] As an example, the aforementioned execution entity can utilize the initial spatiotemporal data temporal heterogeneity adjustment model to cover elements whose coverage information is greater than a predetermined value for each region coverage information in the region coverage information set, thereby obtaining coverage region data. Then, the obtained coverage region datasets are concatenated to obtain concatenated data, which serves as the enhanced spatiotemporal data.

[0162] Step 303: Input the above-mentioned spatiotemporal data sequence and the above-mentioned enhanced spatiotemporal data sequence into the initial spatiotemporal data encoding model included in the above-mentioned initial spatiotemporal data quality adjustment model, so as to output the spatiotemporal encoding vector sequence and the enhanced spatiotemporal encoding vector sequence.

[0163] Step 304: Generate at least one loss information based on at least one of the above-mentioned spatiotemporal coding vector sequence, the above-mentioned enhanced spatiotemporal coding vector sequence, and the initial loss information generation model set included in the above-mentioned initial spatiotemporal data quality adjustment model.

[0164] Step 305: Based on at least one of the above loss information, train the above initial spatiotemporal data quality adjustment model to output the spatiotemporal data quality adjustment model.

[0165] In some embodiments, the specific implementation of steps 301 and 303-305 and their resulting technical effects can be found in [reference needed]. Figure 2 Steps 201 and 203-205 in the corresponding embodiments will not be repeated here.

[0166] from Figure 3 It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 3 In some corresponding embodiments, the model training method process 300 utilizes the temporal heterogeneity after training to adjust the model and perform data augmentation on each spatiotemporal data in the spatiotemporal data sequence in terms of temporal heterogeneity. The resulting augmented spatiotemporal data sequence has better temporal heterogeneity and improves the quality of spatiotemporal data.

[0167] Continue to refer to Figure 4 The flowchart 400 illustrates some embodiments of a data adjustment method according to this disclosure. The data adjustment method includes the following steps:

[0168] Step 401: Obtain target spatiotemporal data.

[0169] In some embodiments, the execution entity of the above model training method (e.g. Figure 1 The electronic device 101 shown can acquire target spatiotemporal data via a wired or wireless connection. The target spatiotemporal data can be spatiotemporal data to be quality adjusted.

[0170] Step 402: Input the above target spatiotemporal data into the spatiotemporal data quality adjustment model to output adjusted spatiotemporal data.

[0171] In some embodiments, the execution entity may input the target spatiotemporal data into a spatiotemporal data quality adjustment model to output adjusted spatiotemporal data. The spatiotemporal data quality adjustment model is generated based on the model training method described in the embodiments of this disclosure. The spatiotemporal data quality adjustment model may be a model whose parameters have been trained.

[0172] As an example, the aforementioned executing entity can input the target spatiotemporal data into the data temporal and spatial heterogeneity adjustment model in the spatiotemporal data quality adjustment model to output adjusted spatiotemporal data.

[0173] The above embodiments of this disclosure have the following beneficial effects: by using the data adjustment methods of some embodiments of this disclosure and utilizing the spatiotemporal data quality adjustment model, high-quality adjusted spatiotemporal data can be generated.

[0174] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a model training apparatus, which are similar to... Figure 2 Corresponding to the method embodiments shown, this model training device can be specifically applied to various electronic devices.

[0175] like Figure 5As shown, a model training device 500 includes: a first acquisition unit 501, a first input unit 502, a second input unit 503, a generation unit 504, and a training unit 505. The system comprises the following components: a first acquisition unit 501, configured to acquire a spatiotemporal data sequence for a target region; a first input unit 502, configured to input the spatiotemporal data sequence into an initial data temporal and spatial heterogeneity adjustment model included in the initial spatiotemporal data quality adjustment model, to output an enhanced spatiotemporal data sequence; a second input unit 503, configured to input the spatiotemporal data sequence and the enhanced spatiotemporal data sequence into an initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model, to output a spatiotemporal encoded vector sequence and an enhanced spatiotemporal encoded vector sequence; a generation unit 504, configured to generate at least one model from a model set based on the spatiotemporal encoded vector sequence, the enhanced spatiotemporal encoded vector sequence, and the initial loss information included in the initial spatiotemporal data quality adjustment model, to generate at least one loss information; and a training unit 505, configured to train the initial spatiotemporal data quality adjustment model based on the at least one loss information, to output a spatiotemporal data quality adjustment model.

[0176] In some optional implementations of some embodiments, the initial data temporal and spatial heterogeneity adjustment model includes: an initial temporal heterogeneity adjustment model; and the first input unit 501 can be further configured to: input each spatiotemporal data in the spatiotemporal data sequence into the initial temporal heterogeneity adjustment model to output enhanced spatiotemporal data.

[0177] In some optional implementations of certain embodiments, the spatiotemporal data in the aforementioned spatiotemporal data sequence includes multiple regional data; and the first input unit 501 can be further configured to: for each regional data corresponding to the aforementioned spatiotemporal data among the multiple regional data, using an initial temporal heterogeneity adjustment model, perform the following first generation step: obtain a regional temporal representation vector for the regional data; generate regional element probability information for the aforementioned regional data based on the aforementioned regional temporal representation vector and initial training model parameters; generate regional masking information for the aforementioned regional data based on the aforementioned regional element probability information; and generate enhanced spatiotemporal data for the aforementioned spatiotemporal data using the aforementioned initial spatiotemporal data temporal heterogeneity adjustment model and the obtained regional masking information set.

[0178] In some optional implementations of certain embodiments, the initial data temporal and spatial heterogeneity adjustment model includes an initial inter-regional heterogeneity adjustment model. The first input unit 501 can be further configured to input each spatiotemporal data point in the spatiotemporal data sequence into the initial inter-regional heterogeneity adjustment model to output enhanced spatiotemporal data.

[0179] In some optional implementations of certain embodiments, the spatiotemporal data in the aforementioned spatiotemporal data sequence includes multiple regional data; and the first input unit 501 may be further configured to: for each of the multiple regional data, using the aforementioned initial inter-regional heterogeneity adjustment model, perform the following second generation step: generate a regional global time representation vector for the aforementioned regional data as a target regional global time representation vector; determine sub-regions that have a positional proximity relationship with the sub-regions corresponding to the aforementioned regional data, and obtain at least one sub-region information; determine the regional global time representation vector corresponding to each of the at least one sub-region information as a neighboring regional global time representation vector, and obtain at least one neighboring regional global time representation vector; generate a regional dividing line masking information set for the aforementioned regional data based on the aforementioned target regional global time representation vector and the aforementioned at least one neighboring regional global time representation vector; and generate enhanced spatiotemporal data for the aforementioned spatiotemporal data based on the obtained regional dividing line masking information set and the aforementioned multiple regional data.

[0180] In some optional implementations of some embodiments, the above-mentioned initial loss information generation model set includes: an initial spatial heterogeneity contrastive loss generation model; and the generation unit 504 can be further configured to: generate first loss information based on the above-mentioned spatiotemporal coding vector sequence, the above-mentioned enhanced spatiotemporal coding vector sequence and the above-mentioned initial spatial heterogeneity contrastive loss generation model.

[0181] In some optional implementations of some embodiments, the spatiotemporal encoded vectors in the spatiotemporal encoded vector sequence include multiple spatiotemporal encoded sub-vectors, and the enhanced spatiotemporal encoded vectors in the enhanced spatiotemporal encoded vector sequence include multiple enhanced spatiotemporal encoded sub-vectors; and the generation unit 504 can be further configured to: for each spatiotemporal encoded vector in the spatiotemporal encoded vector sequence, perform the following third generation step: determine multiple spatiotemporal encoded sub-vectors corresponding to the spatiotemporal encoded vector as multiple first target spatiotemporal encoded sub-vectors; for each of the multiple first target spatiotemporal encoded sub-vectors, perform the following fourth generation step: determine the first enhanced spatiotemporal encoded sub-vector sequence in the enhanced spatiotemporal encoded vector sequence that has a regional correspondence with the first target spatiotemporal encoded vector; obtain multiple spatiotemporal data clustering algorithms corresponding to multiple Initial cluster center vectors are generated; based on the multiple initial cluster center vectors, a first clustering result is generated for each first enhanced spatiotemporal coding sub-vector in the first enhanced spatiotemporal coding sub-vector sequence, resulting in a first clustering result sequence; based on the multiple initial cluster center vectors, a second clustering result is generated for the first target spatiotemporal coding vector; based on the first clustering result sequence and the second clustering result, clustering loss information for the first target spatiotemporal coding vector is generated using the initial spatial heterogeneity contrastive loss generation model; based on the obtained multiple clustering loss information, spatial heterogeneity loss information for the spatiotemporal coding vector is generated using the initial spatial heterogeneity contrastive loss generation model; based on the obtained spatial heterogeneity loss information sequence, the first loss information is generated using the initial spatial heterogeneity contrastive loss generation model.

[0182] In some optional implementations of some embodiments, the initial loss information generation model set mentioned above includes: an initial temporal heterogeneity contrastive loss model; and the generation unit 504 can be further configured to: generate second loss information based on the spatiotemporal coding vector sequence mentioned above, the enhanced spatiotemporal coding vector sequence mentioned above and the initial temporal heterogeneity contrastive loss model mentioned above.

[0183] In some optional implementations of some embodiments, the spatiotemporal coding vectors in the above-mentioned spatiotemporal coding vector sequence include multiple spatiotemporal coding sub-vectors, and the enhanced spatiotemporal coding vectors in the above-mentioned enhanced spatiotemporal coding vector sequence include multiple enhanced spatiotemporal coding sub-vectors; and the generation unit 504 can be further configured to: for each spatiotemporal coding vector in the above-mentioned spatiotemporal coding vector sequence, perform the following fifth generation step: determine multiple spatiotemporal coding sub-vectors corresponding to the above-mentioned spatiotemporal coding vector as multiple second target spatiotemporal coding sub-vectors; for each second target spatiotemporal coding sub-vector in the multiple second target spatiotemporal coding sub-vectors, perform the following sixth generation step: determine the existence of the above-mentioned second target spatiotemporal coding vector. The second enhanced spatiotemporal coding sub-vector sequence in the aforementioned enhanced spatiotemporal coding vector sequence, which has regional and temporal correspondences, is used to generate feature fusion vectors for target sub-regions and target times based on the aforementioned second target spatiotemporal coding vector and the aforementioned second enhanced spatiotemporal coding sub-vector sequence. The target sub-region is the region corresponding to the aforementioned second target spatiotemporal coding vector, and the target time is the time corresponding to the aforementioned second target spatiotemporal coding vector. A global representation vector for the target region is generated based on the obtained feature fusion vector set. The second loss information is generated using the aforementioned initial temporal heterogeneity contrastive loss model based on the obtained global representation vector set for the target region and the obtained feature fusion vector set.

[0184] In some optional implementations of some embodiments, the above-mentioned initial loss information generation model set includes: an initial spatiotemporal representation loss generation model; and the generation unit 504 can be further configured to: generate third loss information based on the above-mentioned spatiotemporal coding vector sequence, the above-mentioned enhanced spatiotemporal coding vector sequence and the above-mentioned initial spatiotemporal representation loss generation model.

[0185] In some optional implementations of certain embodiments, the aforementioned initial spatiotemporal representation loss generation model includes: an initial spatiotemporal data representation vector prediction model and an initial spatiotemporal representation vector loss generation model; and the generation unit 504 may be further configured to: obtain the actual spatiotemporal data representation vector sequence for the aforementioned spatiotemporal data sequence; input the aforementioned spatiotemporal coding vector sequence and the aforementioned enhanced spatiotemporal coding vector sequence into the aforementioned initial spatiotemporal data representation vector prediction model to output the predicted spatiotemporal data representation vector sequence and the predicted enhanced spatiotemporal data representation vector sequence; and generate the aforementioned third loss information using the aforementioned initial spatiotemporal representation vector loss generation model based on the aforementioned predicted spatiotemporal data representation vector sequence, the aforementioned predicted enhanced spatiotemporal data representation vector sequence, and the aforementioned actual spatiotemporal data representation vector sequence.

[0186] In some optional implementations of some embodiments, the above-mentioned initial spatiotemporal data encoding model includes: at least one temporal dimension vector convolutional network model and at least one spatial dimension vector convolutional network model.

[0187] It is understandable that the units described in the model training device 500 are related to the reference... Figure 2 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the model training device 500 and the units contained therein, and will not be repeated here.

[0188] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a data adjustment device, which are similar to... Figure 4 Corresponding to the method embodiments shown, this data adjustment device can be specifically applied to various electronic devices.

[0189] like Figure 6 As shown, a data adjustment device 600 includes a second acquisition unit 601 and a third input unit 602. The second acquisition unit 601 is configured to acquire target spatiotemporal data; the third input unit 602 is configured to input the target spatiotemporal data into a spatiotemporal data quality adjustment model to output adjusted spatiotemporal data. The spatiotemporal data quality adjustment model is generated based on the model training method described in the embodiments of this disclosure.

[0190] It is understandable that the units described in the data adjustment device 600 are related to the reference. Figure 4 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the data adjustment device 600 and the units contained therein, and will not be repeated here.

[0191] The following is for reference. Figure 7 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 A schematic diagram of the structure of electronic device 101)700 in the middle. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0192] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory 702 or a program loaded from a storage device 708 into a random access memory 703. The random access memory 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, the read-only memory 702, and the random access memory 703 are interconnected via a bus 704. An input / output interface 705 is also connected to the bus 704.

[0193] Typically, the following devices can be connected to the input / output interface 705: input devices 706 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 708 including, for example, magnetic tape, hard disk, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 7 Each box shown can represent a device or multiple devices as needed.

[0194] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 709, or installed from a storage device 708, or installed from a read-only memory 702. When the computer program is executed by the processing device 701, it performs the functions defined in the methods of some embodiments of this disclosure.

[0195] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0196] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0197] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire a spatiotemporal data sequence for a target region; input the aforementioned spatiotemporal data sequence into an initial data temporal and spatial heterogeneity adjustment model included in an initial spatiotemporal data quality adjustment model to output an enhanced spatiotemporal data sequence; input the aforementioned spatiotemporal data sequence and the enhanced spatiotemporal data sequence into an initial spatiotemporal data encoding model included in the aforementioned initial spatiotemporal data quality adjustment model to output a spatiotemporal encoded vector sequence and an enhanced spatiotemporal encoded vector sequence; generate at least one model from a model set based on the aforementioned spatiotemporal encoded vector sequence, the enhanced spatiotemporal encoded vector sequence, and the initial loss information included in the aforementioned initial spatiotemporal data quality adjustment model, generating at least one loss information; and train the aforementioned initial spatiotemporal data quality adjustment model based on the aforementioned at least one loss information to output a spatiotemporal data quality adjustment model. Acquire target spatiotemporal data; input the target spatiotemporal data into a spatiotemporal data quality adjustment model to output adjusted spatiotemporal data, wherein the spatiotemporal data quality adjustment model is generated based on the model training method in the embodiments of this disclosure.

[0198] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0199] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0200] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first acquisition unit, a first input unit, a second input unit, a generation unit, and a training unit. The names of these units do not necessarily limit the specific unit; for example, the first acquisition unit may also be described as "a unit for acquiring spatiotemporal data sequences for a target region."

[0201] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0202] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the model training methods and data adjustment methods described above.

[0203] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A model training method, comprising: Acquire a spatiotemporal data sequence for the target area. The spatiotemporal data is collected from the real world. The spatiotemporal data is the historical spatiotemporal traffic data of the target area. The historical spatiotemporal traffic data is the historical vehicle traffic flow change data or historical pedestrian traffic flow change data of the target area. The spatiotemporal data sequence is input into the initial data temporal and spatial heterogeneity adjustment model, which is included in the initial spatiotemporal data quality adjustment model, to output an enhanced spatiotemporal data sequence. The spatiotemporal data sequence and the enhanced spatiotemporal data sequence are input into the initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model to output a spatiotemporal encoding vector sequence and an enhanced spatiotemporal encoding vector sequence. At least one loss information is generated based on at least one of the following: the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial loss information included in the initial spatiotemporal data quality adjustment model; Based on the at least one loss information, the initial spatiotemporal data quality adjustment model is trained to output the spatiotemporal data quality adjustment model.

2. The method according to claim 1, wherein, The initial data temporal and spatial heterogeneity adjustment model includes: an initial temporal heterogeneity adjustment model; and The step of inputting the spatiotemporal data sequence into the initial spatiotemporal data quality adjustment model, including the initial data temporal and spatial heterogeneity adjustment model, to output an enhanced spatiotemporal data sequence includes: Each spatiotemporal data point in the spatiotemporal data sequence is input into the initial temporal heterogeneity adjustment model to output enhanced spatiotemporal data.

3. The method according to claim 2, wherein, The spatiotemporal data sequence includes spatiotemporal data from multiple regions; as well as The step of inputting each spatiotemporal data point in the spatiotemporal data sequence into the initial temporal heterogeneity adjustment model to output enhanced spatiotemporal data includes: For each region data corresponding to the spatiotemporal data, the initial temporal heterogeneity adjustment model is used to perform the following first generation step: Obtain the regional time representation vector for regional data; Based on the regional time representation vector and the initial training model parameters, generate regional element probability information for the regional data; Based on the probability information of the region elements, region masking information is generated for the region data; Using the initial spatiotemporal data temporal heterogeneity adjustment model, enhanced spatiotemporal data is generated based on the obtained regional occlusion information set.

4. The method according to claim 1, wherein, The initial data temporal and spatial heterogeneity adjustment model includes: an initial inter-regional heterogeneity adjustment model; and The step of inputting the spatiotemporal data sequence into the initial spatiotemporal data quality adjustment model, including the initial data temporal and spatial heterogeneity adjustment model, to output an enhanced spatiotemporal data sequence includes: Each spatiotemporal data point in the spatiotemporal data sequence is input into the initial interregional heterogeneity adjustment model to output enhanced spatiotemporal data.

5. The method according to claim 4, wherein, The spatiotemporal data sequence includes spatiotemporal data from multiple regions; as well as The step of inputting each spatiotemporal data point in the spatiotemporal data sequence into the initial inter-regional heterogeneity adjustment model to output enhanced spatiotemporal data includes: For each of the multiple regional data sets, the following second generation step is performed using the initial inter-regional heterogeneity adjustment model: Generate a regional global time representation vector for the data in the region, and use it as the target regional global time representation vector; Identify sub-regions that are geographically adjacent to the sub-regions corresponding to the regional data, and obtain at least one sub-region information; Determine the regional global time representation vector corresponding to each sub-region information in the at least one sub-region information, and use it as the global time representation vector of the neighboring region to obtain at least one global time representation vector of the neighboring region. Based on the global time representation vector of the target region and the global time representation vector of at least one neighboring region, a set of region division line masking information is generated for the region data. Based on the obtained set of regional division line masking information and the multiple regional data, enhanced spatiotemporal data for the spatiotemporal data is generated.

6. The method according to claim 1, wherein, The initial loss information generation model set includes: an initial spatial heterogeneity contrastive loss generation model; and The step of generating at least one loss information from the model set including the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial loss information included in the initial spatiotemporal data quality adjustment model, includes: First loss information is generated based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial spatial heterogeneity contrastive loss generation model.

7. The method according to claim 6, wherein, The spatiotemporal coding vector sequence includes multiple spatiotemporal coding sub-vectors, and the enhanced spatiotemporal coding vector sequence includes multiple enhanced spatiotemporal coding sub-vectors; and The step of generating first loss information based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial spatial heterogeneity contrastive loss generation model includes: For each spatiotemporal encoded vector in the spatiotemporal encoded vector sequence, the following third generation step is performed: Determine multiple spatiotemporal coding sub-vectors corresponding to the spatiotemporal coding vector, and use them as multiple first target spatiotemporal coding sub-vectors; For each of the plurality of first target spatiotemporal encoded subvectors, the following fourth generation step is performed: Determine the first enhanced spatiotemporal coding sub-vector sequence in the enhanced spatiotemporal coding vector sequence that has a regional correspondence with the first target spatiotemporal coding vector; Obtain multiple initial cluster center vectors corresponding to spatiotemporal data clustering algorithms; Based on the plurality of initial cluster center vectors, generate the first clustering result corresponding to each first enhanced spatiotemporal coding sub-vector in the first enhanced spatiotemporal coding sub-vector sequence, and obtain the first clustering result sequence; Based on the plurality of initial cluster center vectors, a second clustering result corresponding to the first target spatiotemporal encoding vector is generated; Based on the first clustering result sequence and the second clustering result, clustering loss information for the first target spatiotemporal encoding vector is generated using the initial spatial heterogeneity contrastive loss generation model. Based on the obtained clustering loss information, the initial spatial heterogeneity contrastive loss generation model is used to generate spatial heterogeneity loss information for the spatiotemporal encoding vector. Based on the obtained spatial heterogeneity loss information sequence, the first loss information is generated using the initial spatial heterogeneity contrast loss generation model.

8. The method according to claim 1, wherein, The initial loss information generation model set includes: an initial temporal heterogeneity contrastive loss model; and The step of generating at least one loss information from the model set including the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial loss information included in the initial spatiotemporal data quality adjustment model, includes: The second loss information is generated based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial temporal heterogeneity contrastive loss model.

9. The method according to claim 8, wherein, The spatiotemporal coding vector sequence includes multiple spatiotemporal coding sub-vectors, and the enhanced spatiotemporal coding vector sequence includes multiple enhanced spatiotemporal coding sub-vectors. as well as The step of generating second loss information based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial temporal heterogeneity contrastive loss model includes: For each spatiotemporal encoded vector in the spatiotemporal encoded vector sequence, perform the following fifth generation step: Determine multiple spatiotemporal coding sub-vectors corresponding to the spatiotemporal coding vector, and use them as multiple second target spatiotemporal coding sub-vectors; For each of the multiple second-target spatiotemporal coding subvectors, perform the following sixth generation step: Determine the second enhanced spatiotemporal coded sub-vector sequence in the enhanced spatiotemporal coded vector sequence that has a regional correspondence and a temporal correspondence with the second target spatiotemporal coded vector; Based on the second target spatiotemporal coding vector and the second enhanced spatiotemporal coding sub-vector sequence, a feature fusion vector for the target sub-region and the target time is generated, wherein the target sub-region is the region corresponding to the second target spatiotemporal coding vector and the target time is the time corresponding to the second target spatiotemporal coding vector; Based on the obtained feature fusion vector set, a global representation vector of the target region is generated; Based on the obtained global representation vector set of the target region and the obtained feature fusion vector set, the second loss information is generated using the initial temporal heterogeneity contrastive loss model.

10. The method according to claim 1, wherein, The initial loss information generation model set includes: an initial spatiotemporal representation loss generation model; and The step of generating at least one loss information from the model set including the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial loss information included in the initial spatiotemporal data quality adjustment model, includes: A third loss information is generated based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial spatiotemporal representation loss generation model.

11. The method according to claim 10, wherein, The initial spatiotemporal representation loss generation model includes: an initial spatiotemporal data representation vector prediction model and an initial spatiotemporal representation vector loss generation model; and The step of generating third loss information based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial spatiotemporal representation loss generation model includes: Obtain the actual spatiotemporal data representation vector sequence for the spatiotemporal data sequence; The spatiotemporal coding vector sequence and the enhanced spatiotemporal coding vector sequence are input into the initial spatiotemporal data representation vector prediction model to output the predicted spatiotemporal data representation vector sequence and the predicted enhanced spatiotemporal data representation vector sequence. Based on the predicted spatiotemporal data representation vector sequence, the predicted enhanced spatiotemporal data representation vector sequence, and the actual spatiotemporal data representation vector sequence, the third loss information is generated using the initial spatiotemporal representation vector loss generation model.

12. The method according to claim 1, wherein, The initial spatiotemporal data encoding model includes at least one temporal dimension vector convolutional network model and at least one spatial dimension vector convolutional network model.

13. A data adjustment method, comprising: Acquire target spatiotemporal data; The target spatiotemporal data is input into the spatiotemporal data quality adjustment model to output adjusted spatiotemporal data, wherein the spatiotemporal data quality adjustment model is generated based on the method described in any one of claims 1-12.

14. A model training device, comprising: The first acquisition unit is configured to acquire a spatiotemporal data sequence for a target area. The spatiotemporal data is collected from the real world and is historical spatiotemporal traffic data of the target area. The historical spatiotemporal traffic data is historical vehicle traffic change data or historical pedestrian traffic change data of the target area. The first input unit is configured to input the spatiotemporal data sequence into the initial data temporal and spatial heterogeneity adjustment model included in the initial spatiotemporal data quality adjustment model, so as to output an enhanced spatiotemporal data sequence. The second input unit is configured to input the spatiotemporal data sequence and the enhanced spatiotemporal data sequence into the initial spatiotemporal data encoding model included in the initial spatiotemporal data quality adjustment model, so as to output the spatiotemporal encoding vector sequence and the enhanced spatiotemporal encoding vector sequence. The generation unit is configured to generate at least one loss information from a set of generation models based on the spatiotemporal coding vector sequence, the enhanced spatiotemporal coding vector sequence, and the initial loss information included in the initial spatiotemporal data quality adjustment model. The training unit is configured to train the initial spatiotemporal data quality adjustment model based on the at least one loss information to output the spatiotemporal data quality adjustment model.

15. A data adjustment device, comprising: The second acquisition unit is configured to acquire target spatiotemporal data; The third input unit is configured to input the target spatiotemporal data into the spatiotemporal data quality adjustment model to output adjusted spatiotemporal data, wherein the spatiotemporal data quality adjustment model is generated based on the method described in any one of claims 1-12.

16. An electronic device comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-13.

17. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-13.

18. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Traffic data multi-mode missing filling method based on space-time fusion

    CN112766325A

  • Short-term traffic flow prediction model based on dynamic space-time analysis

    CN113420414A