WO2022252843A1 - Method and apparatus for training spatio-temporal data processing model, and device and storage medium - Google Patents

Method and apparatus for training spatio-temporal data processing model, and device and storage medium Download PDF

Info

Publication number
WO2022252843A1
WO2022252843A1 PCT/CN2022/086925 CN2022086925W WO2022252843A1 WO 2022252843 A1 WO2022252843 A1 WO 2022252843A1 CN 2022086925 W CN2022086925 W CN 2022086925W WO 2022252843 A1 WO2022252843 A1 WO 2022252843A1
Authority
WO
WIPO (PCT)
Prior art keywords
spatio
data
region
temporal
temporal data
Prior art date
Application number
PCT/CN2022/086925
Other languages
French (fr)
Chinese (zh)
Inventor
李婷
包锴楠
张钧波
郑宇�
Original Assignee
京东城市(北京)数字科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东城市(北京)数字科技有限公司 filed Critical 京东城市(北京)数字科技有限公司
Publication of WO2022252843A1 publication Critical patent/WO2022252843A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Definitions

  • the present disclosure relates to the field of computer technology, in particular to the field of artificial intelligence technology such as deep learning and big data, and in particular to a training method, device, equipment and storage medium for a spatio-temporal data processing model.
  • spatio-temporal data is generated all the time, such as positioning data, mobile phone signaling data, wireless network data, etc.
  • accurate and high-quality spatio-temporal data are usually a small amount, and it is difficult and expensive to obtain.
  • Accurate spatiotemporal data restoration is a very basic function in smart city applications. It can provide support for fine-grained passenger flow inference in scenic spots, offline intelligent marketing, intelligent traffic optimization scheduling, crowd gathering warning, and intelligent location selection. In related technologies, directly using a small amount of high-quality data to train the model may easily lead to over-fitting of the model, which cannot accurately reflect the real data situation. Therefore, how to improve the accuracy and reliability of spatio-temporal data is an urgent problem to be solved.
  • the disclosure provides a training method, device, equipment and storage medium of a spatio-temporal data processing model.
  • a training method for a spatio-temporal data processing model including:
  • a first degree of difference between the first data representation and the second data representation is less than a first threshold, and a second degree of difference between the first data representation and the third data representation is greater than a second threshold case, end the training process of the spatio-temporal data processing model.
  • a training device for a spatio-temporal data processing model including:
  • An extraction module configured to extract target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region;
  • the first acquisition module is configured to acquire, from the training data set, first reference space-time data associated with a first reference area that is the same as the attribute information of any area, and a first reference space-time data that is different from the attribute information of any area.
  • the second acquisition module is configured to respectively input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained, so as to respectively acquire the first data representation, the second reference spatio-temporal data Two data representations and a third data representation;
  • a judging module configured to have a first degree of difference between the first data representation and the second data representation less than a first threshold, and a second degree of difference between the first data representation and the third data representation If it is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
  • an electronic device including:
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described in the above one aspect embodiment.
  • a non-transitory computer-readable storage medium storing computer instructions, the computer instructions are used to make the computer execute the method described in the above-mentioned one embodiment.
  • a computer program product including a computer program, when the computer program is executed by a processor, the method described in the above one embodiment is implemented.
  • a computer program includes computer program code, and when the computer program code is run on a computer, the computer executes the method described in the above one embodiment.
  • the training method, device, equipment and storage medium of the spatio-temporal data processing model provided by the present disclosure at least have the following
  • the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set
  • the first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area and then the target spatio-temporal data, the first reference spatio-temporal data
  • the data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively.
  • the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
  • FIG. 1 is a schematic flowchart of a training method for a spatio-temporal data processing model provided according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a training method for a spatio-temporal data processing model provided according to another embodiment of the present disclosure
  • Fig. 3 is a schematic flowchart of a training method for a spatio-temporal data processing model provided according to another embodiment of the present disclosure
  • FIG. 4 is a framework diagram of model pre-training of a spatio-temporal data processing model training method provided according to an embodiment of the present disclosure
  • FIG. 5 is a framework diagram of population inference for multi-source data fusion provided by an embodiment of the present disclosure
  • FIG. 6 is a structural block diagram of a training device for a spatio-temporal data processing model provided by an embodiment of the present disclosure
  • Fig. 7 is a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
  • the training method of the spatio-temporal data processing model proposed in this disclosure can be executed by the training device based on the spatio-temporal data processing model provided by this disclosure, and can also be executed by the electronic equipment provided by this disclosure, wherein the electronic equipment can include but not limited to desktop computers, tablet computers and other terminal equipment, which can also be a server.
  • the training device for a spatio-temporal data processing model provided by the present disclosure is used to execute the training method of a spatio-temporal data processing model provided by the present disclosure, which is not a limitation of the present disclosure, hereinafter referred to as for "device".
  • FIG. 1 is a schematic flowchart of a training method for a spatio-temporal data processing model according to an embodiment of the present disclosure.
  • the training method of the spatio-temporal data processing model may include the following steps:
  • Step S101 extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region.
  • spatio-temporal data has temporal features and spatial features.
  • Temporal features represent the features of spatio-temporal data in the time dimension
  • spatial features represent the features of spatio-temporal data in spatial features.
  • spatio-temporal data may be real-time positioning data, communication data, real-time population distribution data in an area, etc., which are not limited here.
  • the target spatio-temporal data is the spatio-temporal data associated with any area, where any area may be a scenic area, a school, a shopping mall, etc., which is not limited here.
  • the attribute information of each area may be the location, area, flow of people, population data, traffic conditions, type, etc. of each area, which is not limited here.
  • Step S102 acquiring first reference space-time data associated with a first reference area with the same attribute information of any area and second reference space-time data associated with a second reference area with different attribute information of any area from the training data set .
  • the device may obtain from the training dataset the first reference spatio-temporal data associated with the first reference region that has the same attribute information of any region, and acquire the attribute information of any region from the training dataset The second reference spatio-temporal data associated with the second reference area that are different in all of them.
  • the first reference spatio-temporal data associated with the first reference region that is the same as at least one attribute information of the attribute information of any region can also be obtained from the training data set, and the attribute information of any region can be obtained from the training data set
  • the second reference spatio-temporal data associated with the second reference area in which each attribute information is different which is not limited.
  • the apparatus may determine the first threshold according to a first matching degree between the attribute information of any region and the attribute information of the first reference region. It can be understood that since any region has the same attribute information as the first reference region, that is, any region and the first reference region should be the same or similar, so the first matching degree between any region and the first reference region is relatively high, The degree of difference is small, so the first threshold is small.
  • the apparatus may determine the second threshold according to a second matching degree between the attribute information of any region and the attribute information of the second reference region. It can be understood that, since the attribute information of any area is different from that of the second reference area, that is, the difference between any area and the first reference area should be different or relatively large, so the second matching degree comparison between any area and the second reference area Low, the degree of difference is large, so the second threshold is large.
  • Step S103 input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data respectively into the spatio-temporal data processing model to be trained to obtain the first data representation, the second data representation and the third data representation respectively.
  • the first data representation may represent features of the target spatio-temporal data, which may be vectors, matrices, etc., which is not limited in the present disclosure.
  • the second data representation may represent the first reference spatio-temporal data
  • the third data representation may represent the second reference spatio-temporal data.
  • Step S104 when the first degree of difference between the first data representation and the second data representation is smaller than the first threshold, and the second difference between the first data representation and the third data representation is greater than the second threshold, end the spatio-temporal The training process of the data processing model.
  • the device may calculate the degree of difference between the first data representation and the second data representation, and between the first data representation and the third data representation.
  • the apparatus may determine the first degree of difference by comparing the first data representation with the second data representation, and determine the second degree of difference by comparing the first data representation with the third data representation.
  • the first threshold is the threshold of the first degree of difference determined according to the first degree of matching
  • the second threshold is the threshold of the second degree of difference determined according to the second degree of matching
  • the first reference area is the same area as the attribute information of any area, the corresponding data representations of the two will be relatively similar.
  • the second reference area is an area different from the attribute information of any area.
  • the corresponding data representations of the two will be quite different.
  • the first difference degree is less than the first threshold value, it means that the difference between the first reference area and any area is relatively small; if the second difference degree is greater than the second threshold value, it means that the difference between any area and the second reference area The difference is relatively large.
  • the data representation obtained by using the current spatio-temporal data processing model is reasonable and reliable, that is, it can meet the needs of the device for processing any spatio-temporal region, so the training process of the spatio-temporal data processing model can be ended.
  • the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set
  • the first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area and then the target spatio-temporal data, the first reference spatio-temporal data
  • the data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively.
  • the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
  • Fig. 2 is a schematic flowchart of a training method for a spatio-temporal data processing model according to another embodiment of the present disclosure.
  • the training method of the spatio-temporal data processing model may include the following steps:
  • Step S201 extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region.
  • step S201 reference may be made to the detailed description of any embodiment of the present disclosure, and details are not repeated here.
  • Step S202 acquiring first reference spatio-temporal data associated with a first reference region that is identical to at least one attribute information of any region's attribute information from the training data set.
  • At least one attribute information of the attribute information of the first reference area is the same as that of any area.
  • the first reference spatio-temporal data associated with the area in some embodiments, the device can also acquire the first reference spatio-temporal data associated with the first reference area that has the same area, traffic status, and population gender distribution in any area, where Not limited.
  • Step S203 acquiring second reference spatio-temporal data associated with a second reference region whose attribute information of any region is different from each attribute information from the training data set.
  • the apparatus may use an area that is different from each attribute information in the attribute information of any area as the second reference area.
  • the first reference spatio-temporal data associated with the first reference region that has the same attribute information of any region can also be obtained from the training data set; Second reference spatio-temporal data associated with a second reference area with at least one attribute information different among each attribute information of an area.
  • Step S204 input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data respectively into the spatio-temporal data processing model to be trained to obtain the first data representation, the second data representation and the third data representation respectively.
  • step S204 can refer to the above-mentioned embodiment, which will not be repeated here.
  • Step S205 the first degree of difference between the first data representation and the second data representation is greater than or equal to the first threshold, or the second difference between the first data representation and the third data representation is less than or equal to the second threshold
  • the training process of the spatio-temporal data processing model ends.
  • the first degree of difference between the first data representation and the second data representation is greater than or equal to the first threshold, it means that the spatio-temporal data representation of any region obtained after processing by the spatio-temporal data processing model and the first reference region The difference between them is relatively large, and since the attribute information of any region is the same as that of the first reference region, that is, the corresponding spatiotemporal data representations of the two should be the same or similar, which means that the spatiotemporal data processing model at this time is inaccurate and cannot If the condition for ending the training of the neural network training model is met, the device will continue to return to the operation of extracting target spatio-temporal data from the training data set.
  • the second degree of difference between the first data representation and the third data representation is less than or equal to the second threshold, it means that the spatio-temporal data representation of any region obtained after processing by the spatio-temporal data processing model and the second reference region The difference between them is small, and because the attribute information of any region is different from the second reference region, that is, the corresponding spatiotemporal data representations of the two should be different or have a large difference, which can explain that the spatiotemporal data processing model at this time is inaccurate , the condition for ending the training of the neural network training model cannot be met, then the device will continue to return to the operation of extracting the target spatiotemporal data from the training data set.
  • the training process of the spatio-temporal data processing model may end.
  • the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set
  • the first reference spatio-temporal data associated with at least one of the attribute information of the region is the same as the first reference region, and the first reference region associated with the second reference region that is different in the attribute information of any region is obtained from the training data set.
  • Reference spatio-temporal data and then input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained to obtain the first data representation, the second data representation and the third data respectively representation, finally the first degree of difference between the first data representation and the second data representation is greater than or equal to the first threshold, or the second difference between the first data representation and the third data representation is less than or equal to the second threshold
  • the training process of the spatio-temporal data processing model ends.
  • a large amount of low-quality data can be used to assist in training the spatio-temporal data processing model, so that the time data processing model generated by training can be used to process low-quality spatio-temporal data to obtain more accurate and reliable spatiotemporal data representation.
  • Fig. 3 is a schematic flowchart of a training method for a spatio-temporal data processing model according to yet another embodiment of the present disclosure.
  • the training method of the spatio-temporal data processing model may include the following steps:
  • Step S301 extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region.
  • the spatio-temporal data associated with each area may include a communication data sequence, attribute map, population attribute, and positioning data sequence corresponding to each area, which is not limited.
  • the attribute map can be constructed by the device based on the known attribute information of the region.
  • the region can be used as a node
  • the distance of the road network can be used as the side length
  • the attribute information of the region such as house price, traffic flow
  • the population attribute may be obtained by the device based on the analysis of the acquired positioning data set and communication data, for example, it may be population age distribution, population gender distribution, and the like. This is not limited.
  • the training data set may also include labels corresponding to each area, such as the traffic conditions of each area, whether an aggregation event occurs, etc., which is not limited.
  • Step S302 acquiring first reference spatio-temporal data associated with a first reference area with the same attribute information of any area and second reference spatio-temporal data associated with a second reference area with different attribute information of any area from the training data set .
  • step S302 may refer to any of the foregoing embodiments, and details are not described here.
  • Step S303 use the knowledge fusion network to be trained to fuse the communication data sequence, attribute map, population attribute and positioning data sequence corresponding to any region, the first reference region and the second reference region respectively, so as to obtain the fused target Spatio-temporal data, fused first reference spatio-temporal data and second reference spatio-temporal data.
  • the knowledge fusion network to be trained can be used to use the knowledge to be trained to use the data such as the communication data sequence, attribute map, population attribute, and positioning data sequence corresponding to any area, the first reference area, and the second reference area.
  • the fusion network performs fusion, so that the fused target spatio-temporal data, the first reference spatio-temporal data, and the second reference spatio-temporal data have spatio-temporal data and attribute information of corresponding regions.
  • the Swapped Contrastive Loss mechanism can be used to predict the spatiotemporal data representation of another region from the spatiotemporal data representation of one region, so that smaller batch data can be used To train the network and reduce the memory requirements during model training.
  • the frame diagram of model pre-training shown in FIG. 4 can be adopted in the present disclosure, and the model can be trained by using the exchange contrast loss mechanism.
  • the training framework of the spatio-temporal data processing model can be divided into two types of networks, one is the prototype network (prototype) network, which is a full-connection network (full-connection) network, which mainly undertakes the task of representation calculation , and share network parameters when computing target data and augmented data.
  • the other is the backbone network, which mainly completes the tasks of multi-source data fusion and feature extraction.
  • backbone network corresponds to the spatio-temporal knowledge fusion network in Figure 4
  • prototype network corresponds to the encoding network in Figure 4.
  • swapped contrastive loss can be used to optimize the parameters of the network, and its expression can be:
  • o t and o s can be the output of the backbone network
  • q t and q s can be the output of the prototype network (prototype)
  • L is the cross-entropy loss function
  • L(o t ,q s ) can be calculated by the following formula:
  • is the temperature parameter
  • k is the number of protonet networks.
  • each P a contains the area, traffic conditions and location of the region
  • each P c contains the regional population portrait, such as age and gender, and the reporting point data of dynamic mobile phone positioning
  • the flow of people in the reaction area is not limited.
  • representation learning can be performed using the Message Passing Neural Network (MPNN), where the edge network can be expressed as:
  • w ij is the input of the edge network
  • ⁇ e is the parameter to be learned
  • the message passing network can be defined as:
  • ⁇ g is the parameter of the readout (reading) network.
  • network parameters of the knowledge fusion network to be trained can be optimized, thereby obtaining more accurate target spatio-temporal data, first reference spatio-temporal data, and second reference spatio-temporal data.
  • Step S304 respectively input the fused target spatio-temporal data, fused first reference spatio-temporal data and second reference spatio-temporal data into the spatio-temporal data processing model to be trained, so as to respectively obtain the first data representation, the second data representation Representation and third data representation.
  • Step S305 when the first degree of difference between the first data representation and the second data representation is smaller than the first threshold, and the second difference between the first data representation and the third data representation is greater than the second threshold, end the spatio-temporal The training process of the data processing model.
  • Step S306 input the spatio-temporal data associated with each region into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each region.
  • the device can input the spatio-temporal data associated with each region into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each region.
  • the data representation may represent the spatio-temporal data associated with each region in the form of a static graph structure or in the form of a vector, which is not limited.
  • Figure 5 shows a population inference frame diagram of multi-source data fusion.
  • spatio-temporal data such as communication data sequences, attribute maps, population attributes, and positioning data sequences corresponding to each region.
  • various types of data can be e-commerce data, travel data, rental data, road network data, and point of interest (POI) data.
  • POI point of interest
  • the communication data sequence, attribute map, and population corresponding to any area, the first reference area, and the second reference area are respectively
  • the attributes and positioning data sequences are fused, and then the above-mentioned spatio-temporal data processing model is used to take each fused data as input to obtain each data representation.
  • the device can input each data representation into the space-time predictor, so as to obtain the predicted flow of people in each area, that is, the inferred value.
  • Step S307 input the data representation corresponding to each region into the prediction model to be trained, so as to obtain the prediction label corresponding to each region.
  • the prediction label can be a prediction label for the attribute information of each area, such as the prediction of the flow of people, the prediction of the traffic condition, the prediction of the gender distribution, etc., or it can also be the prediction of the crowd gathering situation, marketing decision, traffic Scheduling decisions and other information are not limited.
  • the corresponding prediction labels obtained by the device through the prediction model may also be different. flow, which is not limited.
  • step S308 the prediction model and the spatio-temporal data processing model generated by training are corrected respectively according to the difference between the predicted label and the labeled label.
  • the device can compare the predicted label with the labeled label to determine the difference between the predicted label and the labeled label. For example, gradient descent, stochastic gradient descent, etc. can be used to determine the corrected gradient.
  • the prediction model and the spatio-temporal data processing model generated by training are respectively corrected, and the method of determining the correction gradient is not limited in the present disclosure.
  • the regression network can also be used to modify the parameters of the spatio-temporal data processing model through the cross loss of the knowledge fusion network.
  • the previously trained backbone network and another regression network to be trained can be used to fine-tune and infer specific tasks, and the specific formula is as follows:
  • o t is the output of the backbone network
  • ⁇ o is the parameter of the regression network f o
  • is the sigmoid activation function.
  • ⁇ b ⁇ a , ⁇ c , ⁇ e , ⁇ g , ⁇ n , ⁇ s ⁇
  • L is the loss function
  • is the learning rate
  • is the decay coefficient
  • the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set
  • the first reference space-time data associated with the first reference area with the same attribute information of the area, and the second reference space-time data associated with the second reference area with different attribute information of any area and then using the knowledge fusion network to be trained, the The communication data sequence, attribute map, population attribute and positioning data sequence respectively corresponding to any region, the first reference region and the second reference region are fused to obtain the fused target spatio-temporal data, the fused first reference spatio-temporal data and Second reference spatio-temporal data, when the first degree of difference between the first data representation and the second data representation is less than the first threshold, and the second difference between the first data representation and the third data representation is greater than the second threshold , end the training process of the spatio
  • the accuracy of the prediction model can be improved, and the fine-tuning of the model can be realized while optimizing the model, realizing the purpose of training with a small amount of data and achieving the effect of approximating the effect of full training data.
  • FIG. 6 is a structural block diagram of a training device for a spatio-temporal data processing model provided by an embodiment of the present disclosure.
  • the training device for the spatio-temporal data processing model includes: an extraction module 610 , a first acquisition module 620 , a second acquisition module 630 and a judgment module 640 .
  • An extraction module configured to extract target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region;
  • the first acquisition module is configured to acquire, from the training data set, first reference space-time data associated with a first reference area that is the same as the attribute information of any area, and a first reference space-time data that is different from the attribute information of any area.
  • the second acquisition module is configured to respectively input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained, so as to respectively acquire the first data representation, the second reference spatio-temporal data Two data representations and a third data representation;
  • a judging module configured to have a first degree of difference between the first data representation and the second data representation less than a first threshold, and a second degree of difference between the first data representation and the third data representation If it is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
  • the attribute information of the region includes the area, population and type of the region, and the first acquisition module is specifically used for:
  • first reference spatio-temporal data associated with a first reference region that is identical to at least one attribute information in the attribute information of any region from the training data set;
  • the second reference spatio-temporal data associated with the second reference region whose attribute information is different in the attribute information of any region is obtained from the training data set.
  • the attribute information of the region includes the area, population and type of the region, and the first acquisition module is specifically used for:
  • Second reference spatio-temporal data associated with a second reference region that is different from at least one attribute information of each attribute information of any region is acquired from the training data set.
  • the device further includes:
  • a first determining module configured to determine the first threshold according to a first degree of matching between the attribute information of any region and the attribute information of the first reference region;
  • the second determining module is configured to determine the second threshold according to a second degree of matching between the attribute information of any region and the attribute information of the second reference region.
  • the judging module is also used for:
  • the first degree of difference between the first data representation and the second data representation is greater than or equal to a first threshold, or the second degree of difference between the first data representation and the third data representation is less than or If it is equal to the second threshold, return to the operation of extracting the target spatio-temporal data from the training data set until the gap between the first data representation newly generated by the spatio-temporal data processing model to be trained and the newly generated second data representation
  • the training process of the spatio-temporal data processing model ends.
  • the training data set also includes annotated labels corresponding to each of the regions, and the device further includes:
  • the third acquisition module is used to input the spatio-temporal data associated with each of the regions into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each of the regions;
  • the fourth acquisition module is used to input the data representation corresponding to each of the regions into the prediction model to be trained, so as to obtain the prediction labels corresponding to each of the regions;
  • the correction module is configured to correct the prediction model and the spatio-temporal data processing model generated by the training according to the difference between the prediction label and the label label.
  • the spatio-temporal data associated with each of the regions includes communication data sequences, attribute maps, population attributes and positioning data sequences corresponding to each region, and the second acquisition module is also used to:
  • the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set
  • the first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area and then the target spatio-temporal data, the first reference spatio-temporal data
  • the data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively.
  • the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
  • the present disclosure also provides an electronic device, a readable storage medium, a computer program product, and a computer program.
  • an electronic device includes:
  • the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the spatiotemporal data processing model described in the above-mentioned embodiments. training method.
  • the readable storage medium is a non-transitory computer-readable storage medium.
  • the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the spatio-temporal data processing model training method described in the above-mentioned embodiments.
  • the computer program product includes a computer program, and when the computer program is executed by a processor, the method for training the spatio-temporal data processing model described in the above embodiments is implemented.
  • FIG. 7 shows a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure.
  • Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • the device 700 includes a computing unit 701 that can execute according to a computer program stored in a read-only memory (ROM) 702 or loaded from a storage unit 708 into a random-access memory (RAM) 703. Various appropriate actions and treatments. In the RAM 703, various programs and data necessary for the operation of the device 700 can also be stored.
  • the computing unit 701, ROM 702, and RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also connected to the bus 704 .
  • the I/O interface 705 includes: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc. ; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like.
  • the communication unit 709 allows the device 700 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
  • the computing unit 701 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 701 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
  • the calculation unit 701 executes various methods and processes described above, such as a training method of a spatio-temporal data processing model.
  • the method for training a spatio-temporal data processing model may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708 .
  • part or all of the computer program may be loaded and/or installed on the device 700 via the ROM 702 and/or the communication unit 709.
  • the computer program When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the training method of the spatio-temporal data processing model described above can be performed.
  • the computing unit 701 may be configured in any other appropriate way (for example, by means of firmware) to execute the training method of the spatio-temporal data processing model.
  • Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC system of systems
  • CPLD load programmable logic device
  • computer hardware firmware, software, and/or combinations thereof.
  • programmable processor can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
  • Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented.
  • the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer.
  • a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or a trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
  • the systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
  • a computer system may include clients and servers.
  • Clients and servers are generally remote from each other and typically interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
  • the server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the problem of traditional physical host and VPS service ("Virtual Private Server", or "VPS”) Among them, there are defects such as difficult management and weak business scalability.
  • the server can also be a server of a distributed system, or a server combined with a blockchain.
  • the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set
  • the first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area and then the target spatio-temporal data, the first reference spatio-temporal data
  • the data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively.
  • the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
  • steps may be reordered, added or deleted using the various forms of flow shown above.
  • each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Tourism & Hospitality (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Human Resources & Organizations (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Economics (AREA)
  • Evolutionary Biology (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a method and apparatus for training a spatio-temporal data processing model, and a device and a storage medium. The method comprises: extracting target spatio-temporal data of any area from a training data set, wherein the training data set comprises spatio-temporal data and attributes of each area; acquiring first reference spatio-temporal data of a first reference area, which has the same attribute as any area, and second reference spatio-temporal data of a second reference area, which has an attribute different from that of any area; inputting the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into a model to be trained, so as to acquire a first data representation, a second data representation and a third data representation; and if the difference between the first data representation and the second data representation is less than a first threshold value, and the difference between the first data representation and the third data representation is greater than a second threshold value, ending the training of the model.

Description

时空数据处理模型的训练方法、装置、设备及存储介质Spatio-temporal data processing model training method, device, equipment and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110612995.7、申请日为2021年6月2日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202110612995.7 and a filing date of June 2, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本公开涉及计算机技术领域,尤其涉及深度学习和大数据等人工智能技术领域,具体涉及一种时空数据处理模型的训练方法、装置、设备及存储介质。The present disclosure relates to the field of computer technology, in particular to the field of artificial intelligence technology such as deep learning and big data, and in particular to a training method, device, equipment and storage medium for a spatio-temporal data processing model.
背景技术Background technique
随着移动互联网发展,基于位置的服务广泛存在于我们生活中,无时无刻不在产生大量的时空数据,比如定位数据、手机信令数据、无线网数据等。然而精准的高质量时空数据通常是少量的,且获取困难、代价昂贵。With the development of the mobile Internet, location-based services widely exist in our lives, and a large amount of spatio-temporal data is generated all the time, such as positioning data, mobile phone signaling data, wireless network data, etc. However, accurate and high-quality spatio-temporal data are usually a small amount, and it is difficult and expensive to obtain.
精准的时空数据修复是智慧城市应用中非常基础的功能,可以为景区细粒度客流推断、线下智能营销、智能交通优化调度、人群聚集预警和智能选址等提供支持。相关技术中,直接用少量的高质量数据训练模型容易导致模型过拟合,无法准确反应真实的数据情况。因而如何提高时空数据的准确性和可靠性,是当前亟需解决的问题。Accurate spatiotemporal data restoration is a very basic function in smart city applications. It can provide support for fine-grained passenger flow inference in scenic spots, offline intelligent marketing, intelligent traffic optimization scheduling, crowd gathering warning, and intelligent location selection. In related technologies, directly using a small amount of high-quality data to train the model may easily lead to over-fitting of the model, which cannot accurately reflect the real data situation. Therefore, how to improve the accuracy and reliability of spatio-temporal data is an urgent problem to be solved.
发明内容Contents of the invention
本公开提供了一种时空数据处理模型的训练方法、装置、设备及存储介质。The disclosure provides a training method, device, equipment and storage medium of a spatio-temporal data processing model.
根据本公开的第一方面,提供了一种时空数据处理模型的训练方法,包括:According to a first aspect of the present disclosure, a training method for a spatio-temporal data processing model is provided, including:
从训练数据集中抽取任一区域关联的目标时空数据,其中,所述训练数据集中包括各个区域关联的时空数据及各个区域的属性信息;Extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region;
从所述训练数据集中获取与所述任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与所述任一区域的属性信息不同的第二参考区域关联的第二参考时空数据;Obtain from the training data set the first reference spatio-temporal data associated with a first reference area with the same attribute information of any area, and the second reference area associated with a second reference area with different attribute information of any area. Reference spatiotemporal data;
将所述目标时空数据、所述第一参考时空数据及所述第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征;Input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained respectively to obtain the first data representation, the second data representation and the third data representation;
在所述第一数据表征与所述第二数据表征间的第一差异度小于第一阈值、且所述第一数据表征与所述第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。A first degree of difference between the first data representation and the second data representation is less than a first threshold, and a second degree of difference between the first data representation and the third data representation is greater than a second threshold case, end the training process of the spatio-temporal data processing model.
根据本公开的第二方面,提供了一种时空数据处理模型的训练装置,包括:According to a second aspect of the present disclosure, a training device for a spatio-temporal data processing model is provided, including:
抽取模块,用于从训练数据集中抽取任一区域关联的目标时空数据,其中,所述训练数据集中包括各个区域关联的时空数据及各个区域的属性信息;An extraction module, configured to extract target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region;
第一获取模块,用于从所述训练数据集中获取与所述任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与所述任一区域的属性信息不同的第二参考区域关联的第二参考时空数据;The first acquisition module is configured to acquire, from the training data set, first reference space-time data associated with a first reference area that is the same as the attribute information of any area, and a first reference space-time data that is different from the attribute information of any area. Second reference spatio-temporal data associated with the second reference area;
第二获取模块,用于将所述目标时空数据、所述第一参考时空数据及所述第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征;The second acquisition module is configured to respectively input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained, so as to respectively acquire the first data representation, the second reference spatio-temporal data Two data representations and a third data representation;
判断模块,用于在所述第一数据表征与所述第二数据表征间的第一差异度小于第一阈值、且所述第一数据表征与所述第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。A judging module, configured to have a first degree of difference between the first data representation and the second data representation less than a first threshold, and a second degree of difference between the first data representation and the third data representation If it is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
根据本公开的第三方面,提供了一种电子设备,包括:According to a third aspect of the present disclosure, an electronic device is provided, including:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述一方面实施例所述的方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described in the above one aspect embodiment.
根据本公开的第四方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行上述一方面实施例所述的方法。According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, the computer instructions are used to make the computer execute the method described in the above-mentioned one embodiment.
根据本公开的第五方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现上述一方面实施例所述的方法。According to a fifth aspect of the present disclosure, there is provided a computer program product, including a computer program, when the computer program is executed by a processor, the method described in the above one embodiment is implemented.
根据本公开的第六方面,提供了一种计算机程序,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行上述一方面实施例所述的方法。According to a sixth aspect of the present disclosure, a computer program is provided, the computer program includes computer program code, and when the computer program code is run on a computer, the computer executes the method described in the above one embodiment.
本公开提供的时空数据处理模型的训练方法、装置、设备以及存储介质至少存在以下The training method, device, equipment and storage medium of the spatio-temporal data processing model provided by the present disclosure at least have the following
有益效果:Beneficial effect:
本公开实施例中该装置首先从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息,然后从训练数据集中获取与任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与任一区域的属性信息不同的第二参考区域关联的第二参考时空数据,之后将目标时空数据、第一参考时空数据及第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。最后在第一数据表征与第二数据表征间的第一差异度小于第一阈值、且第一数据表征与第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。由此,通过利用时空数据的对比自监督学习,即可生成时空数据处理模型,从而可以对时空数据进行处理,以获取准确、可靠的时空数据表征,为在精准的时空数据不足的情况下提高时空预测的准确率提供了条件。In the embodiment of the present disclosure, the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set The first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area, and then the target spatio-temporal data, the first reference spatio-temporal data The data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively. Finally, when the first degree of difference between the first data representation and the second data representation is less than the first threshold, and the second degree of difference between the first data representation and the third data representation is greater than the second threshold, the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood through the following description.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution, and do not constitute a limitation to the present disclosure. in:
图1是根据本公开的一种实施例提供的时空数据处理模型的训练方法的流程示意图;FIG. 1 is a schematic flowchart of a training method for a spatio-temporal data processing model provided according to an embodiment of the present disclosure;
图2是根据本公开的另一种实施例提供的时空数据处理模型的训练方法的流程示意图;FIG. 2 is a schematic flowchart of a training method for a spatio-temporal data processing model provided according to another embodiment of the present disclosure;
图3是根据本公开的又一种实施例提供的时空数据处理模型的训练方法的流程示意图;Fig. 3 is a schematic flowchart of a training method for a spatio-temporal data processing model provided according to another embodiment of the present disclosure;
图4是根据本公开的一种实施例提供的时空数据处理模型的训练方法的模型预训练的框架图;FIG. 4 is a framework diagram of model pre-training of a spatio-temporal data processing model training method provided according to an embodiment of the present disclosure;
图5为本公开的一种实施例提供的多源数据融合的人口推断框架图;FIG. 5 is a framework diagram of population inference for multi-source data fusion provided by an embodiment of the present disclosure;
图6为本公开的一种实施例提供的时空数据处理模型的训练装置的结构框图;FIG. 6 is a structural block diagram of a training device for a spatio-temporal data processing model provided by an embodiment of the present disclosure;
图7为本公开实施例提供的电子设备的结构框图。Fig. 7 is a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
本公开提出的时空数据处理模型的训练方法可由本公开提供的基于时空数据处理模型的训练装置执行,也可以由本公开提供的电子设备执行,其中,电子设备可以包括但不限于台式电脑、平板电脑等终端设备,也可以是服务器,下面以由本公开提供的一种时空数据处理模型的训练装置来执行本公开提供的一种时空数据处理模型的训练方法,而不作为对本公开的限定,以下简称为“装置”。The training method of the spatio-temporal data processing model proposed in this disclosure can be executed by the training device based on the spatio-temporal data processing model provided by this disclosure, and can also be executed by the electronic equipment provided by this disclosure, wherein the electronic equipment can include but not limited to desktop computers, tablet computers and other terminal equipment, which can also be a server. The training device for a spatio-temporal data processing model provided by the present disclosure is used to execute the training method of a spatio-temporal data processing model provided by the present disclosure, which is not a limitation of the present disclosure, hereinafter referred to as for "device".
需要说明的是,本公开中的用户数据均是在符合相关法律、法规的情况下获取的。It should be noted that all user data in this disclosure are obtained in compliance with relevant laws and regulations.
下面参考附图对本公开提供的一种时空数据处理模型的训练方法、装置、计算机设备及存储介质进行详细描述。A training method, device, computer equipment, and storage medium for a spatio-temporal data processing model provided by the present disclosure will be described in detail below with reference to the accompanying drawings.
图1是根据本公开一实施例的时空数据处理模型的训练方法的流程示意图。FIG. 1 is a schematic flowchart of a training method for a spatio-temporal data processing model according to an embodiment of the present disclosure.
如图1所示,该时空数据处理模型的训练方法可以包括以下步骤:As shown in Figure 1, the training method of the spatio-temporal data processing model may include the following steps:
步骤S101,从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息。Step S101 , extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region.
需要说明的是,时空数据具有时间特征和空间特征,时间特征表示时空数据在时间维度上的特征,空间特征表示时空数据在空间特征上的特征。本公开实施例中,时空数据可 以为实时定位数据、通信数据、区域内人口实时分布数据等,在此不进行限定。It should be noted that spatio-temporal data has temporal features and spatial features. Temporal features represent the features of spatio-temporal data in the time dimension, and spatial features represent the features of spatio-temporal data in spatial features. In the embodiments of the present disclosure, spatio-temporal data may be real-time positioning data, communication data, real-time population distribution data in an area, etc., which are not limited here.
其中,目标时空数据是与任一区域关联的时空数据,其中,任一区域可以为景区、学校、商场等地块区域,在此不进行限定。Wherein, the target spatio-temporal data is the spatio-temporal data associated with any area, where any area may be a scenic area, a school, a shopping mall, etc., which is not limited here.
其中,各个区域的属性信息可以为各个区域的位置、面积、人流量、人口数据、交通状况、所属类型等,在此不进行限定。Wherein, the attribute information of each area may be the location, area, flow of people, population data, traffic conditions, type, etc. of each area, which is not limited here.
步骤S102,从训练数据集中获取与任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与任一区域的属性信息不同的第二参考区域关联的第二参考时空数据。Step S102, acquiring first reference space-time data associated with a first reference area with the same attribute information of any area and second reference space-time data associated with a second reference area with different attribute information of any area from the training data set .
需要说明的是,为了更好的保证时空数据处理模型,可以利用少量的数据进行训练,学习到不同属性信息的区域对应的时空数据间的差异。在一些实施例中,该装置可以从训练数据集中获取与任一区域的各个属性信息均相同的第一参考区域关联的第一参考时空数据,从训练数据集中获取与任一区域的各个属性信息中均不同的第二参考区域关联的第二参考时空数据。It should be noted that, in order to better guarantee the spatio-temporal data processing model, a small amount of data can be used for training to learn the differences between spatio-temporal data corresponding to regions with different attribute information. In some embodiments, the device may obtain from the training dataset the first reference spatio-temporal data associated with the first reference region that has the same attribute information of any region, and acquire the attribute information of any region from the training dataset The second reference spatio-temporal data associated with the second reference area that are different in all of them.
在一些实施例中,还可以从训练数据集中获取与任一区域的属性信息至少一个属性信息相同的第一参考区域关联的第一参考时空数据,从训练数据集中获取与任一区域的属性信息中各个属性信息均不相同的第二参考区域关联的第二参考时空数据,对此不进行限定。In some embodiments, the first reference spatio-temporal data associated with the first reference region that is the same as at least one attribute information of the attribute information of any region can also be obtained from the training data set, and the attribute information of any region can be obtained from the training data set The second reference spatio-temporal data associated with the second reference area in which each attribute information is different, which is not limited.
在一些实施例中,该装置可以根据任一区域的属性信息与第一参考区域的属性信息的第一匹配度,确定第一阈值。可以理解的是,由于任一区域与第一参考区域的属性信息相同,即任一区域与第一参考区域应该相同或相似,因而任一区域与第一参考区域的第一匹配度比较高,差异度较小,所以第一阈值较小。In some embodiments, the apparatus may determine the first threshold according to a first matching degree between the attribute information of any region and the attribute information of the first reference region. It can be understood that since any region has the same attribute information as the first reference region, that is, any region and the first reference region should be the same or similar, so the first matching degree between any region and the first reference region is relatively high, The degree of difference is small, so the first threshold is small.
在一些实施例中,该装置可以根据任一区域的属性信息与第二参考区域的属性信息的第二匹配度,确定第二阈值。可以理解的是,由于任一区域与第二参考区域的属性信息不同,即任一区域与第一参考区域应该不同或差异较大,因而任一区域与第二参考区域的第二匹配度比较低,差异度较大,所以第二阈值较大。In some embodiments, the apparatus may determine the second threshold according to a second matching degree between the attribute information of any region and the attribute information of the second reference region. It can be understood that, since the attribute information of any area is different from that of the second reference area, that is, the difference between any area and the first reference area should be different or relatively large, so the second matching degree comparison between any area and the second reference area Low, the degree of difference is large, so the second threshold is large.
步骤S103,将目标时空数据、第一参考时空数据及第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。Step S103, input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data respectively into the spatio-temporal data processing model to be trained to obtain the first data representation, the second data representation and the third data representation respectively.
可以理解的是,第一数据表征可表征目标时空数据的特征,其可以为向量、矩阵等等,本公开对此不做限定。相应的,第二数据表征可以表征第一参考时空数据,第三数据表征可以表征第二参考时空数据。It can be understood that the first data representation may represent features of the target spatio-temporal data, which may be vectors, matrices, etc., which is not limited in the present disclosure. Correspondingly, the second data representation may represent the first reference spatio-temporal data, and the third data representation may represent the second reference spatio-temporal data.
步骤S104,在第一数据表征与第二数据表征间的第一差异度小于第一阈值、且第一数据表征与第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。Step S104, when the first degree of difference between the first data representation and the second data representation is smaller than the first threshold, and the second difference between the first data representation and the third data representation is greater than the second threshold, end the spatio-temporal The training process of the data processing model.
在获取第一数据表征、第二数据表征及第三数据表征之后,该装置可以对第一数据表征与第二数据表征间,以及第一数据表征与第三数据表征间的差异度进行计算。在一些实 施例中,该装置可以通过比较第一数据表征和第二数据表征以确定第一差异度,通过比较第一数据表征和第三数据表征来确定第二差异度。After acquiring the first data representation, the second data representation and the third data representation, the device may calculate the degree of difference between the first data representation and the second data representation, and between the first data representation and the third data representation. In some embodiments, the apparatus may determine the first degree of difference by comparing the first data representation with the second data representation, and determine the second degree of difference by comparing the first data representation with the third data representation.
其中,第一阈值为根据第一匹配度确定的第一差异度的阈值,第二阈值为根据第二匹配度确定的第二差异度的阈值。Wherein, the first threshold is the threshold of the first degree of difference determined according to the first degree of matching, and the second threshold is the threshold of the second degree of difference determined according to the second degree of matching.
可以理解的是,由于第一参考区域为与任一区域属性信息相同的区域,从而二者对应的数据表征会比较相近,相应的,第二参考区域为与任一区域属性信息不同的区域,从而二者对应的数据表征会差异较大。而若第一差异度小于第一阈值,则说明第一参考区域和任一区域之间的差异比较小,若第二差异度大于第二阈值,则说明任一区域和第二参考区域之间的差异度比较大。因而,可以说明利用当前的时空数据处理模型得到的数据表征是合理、可靠的,也即可以满足该装置对任一区域时空区域进行处理的需要,所以可以结束时空数据处理模型的训练过程。It can be understood that since the first reference area is the same area as the attribute information of any area, the corresponding data representations of the two will be relatively similar. Correspondingly, the second reference area is an area different from the attribute information of any area. As a result, the corresponding data representations of the two will be quite different. And if the first difference degree is less than the first threshold value, it means that the difference between the first reference area and any area is relatively small; if the second difference degree is greater than the second threshold value, it means that the difference between any area and the second reference area The difference is relatively large. Therefore, it can be shown that the data representation obtained by using the current spatio-temporal data processing model is reasonable and reliable, that is, it can meet the needs of the device for processing any spatio-temporal region, so the training process of the spatio-temporal data processing model can be ended.
本公开实施例中该装置首先从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息,然后从训练数据集中获取与任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与任一区域的属性信息不同的第二参考区域关联的第二参考时空数据,之后将目标时空数据、第一参考时空数据及第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。最后在第一数据表征与第二数据表征间的第一差异度小于第一阈值、且第一数据表征与第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。由此,通过利用时空数据的对比自监督学习,即可生成时空数据处理模型,从而可以对时空数据进行处理,以获取准确、可靠的时空数据表征,为在精准的时空数据不足的情况下提高时空预测的准确率提供了条件。In the embodiment of the present disclosure, the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set The first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area, and then the target spatio-temporal data, the first reference spatio-temporal data The data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively. Finally, when the first degree of difference between the first data representation and the second data representation is less than the first threshold, and the second degree of difference between the first data representation and the third data representation is greater than the second threshold, the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
图2是根据本公开另一实施例的时空数据处理模型的训练方法的流程示意图。Fig. 2 is a schematic flowchart of a training method for a spatio-temporal data processing model according to another embodiment of the present disclosure.
如图2所示,该时空数据处理模型的训练方法可以包括以下步骤:As shown in Figure 2, the training method of the spatio-temporal data processing model may include the following steps:
步骤S201,从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息。Step S201, extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region.
需要说明的是,步骤S201的具体实现过程可以参照本公开任一实施例的详细描述,在此不进行赘述。It should be noted that, for the specific implementation process of step S201, reference may be made to the detailed description of any embodiment of the present disclosure, and details are not repeated here.
步骤S202,从训练数据集中获取与任一区域的属性信息中至少一个属性信息相同的第一参考区域关联的第一参考时空数据。Step S202, acquiring first reference spatio-temporal data associated with a first reference region that is identical to at least one attribute information of any region's attribute information from the training data set.
在一些实施例中,第一参考区域的属性信息与任一区域间的属性信息至少有一个属性信息是相同的,比如,该装置可以获取与任一区域的面积及交通状况相同的第一参考区域关联的第一参考时空数据;在一些实施例中,该装置还可以获取与任一区域的面积、交通状态、人口性别分布均相同的第一参考区域关联的第一参考时空数据,在此不进行限定。In some embodiments, at least one attribute information of the attribute information of the first reference area is the same as that of any area. The first reference spatio-temporal data associated with the area; in some embodiments, the device can also acquire the first reference spatio-temporal data associated with the first reference area that has the same area, traffic status, and population gender distribution in any area, where Not limited.
步骤S203,从训练数据集中获取与任一区域的属性信息中各个属性信息均不相同的第二参考区域关联的第二参考时空数据。Step S203, acquiring second reference spatio-temporal data associated with a second reference region whose attribute information of any region is different from each attribute information from the training data set.
需要说明的是,为了更好的保证时空数据处理模型,可以利用少量的数据进行训练,学习到不同属性信息的区域对应的时空数据间的差异,本公开中,在第一参考区域为属性信息与任一区域的属性信息至少有一个属性信息相同的情况下,该装置可以将与任一区域的属性信息中各个属性信息均不相同的区域,作为第二参考区域。It should be noted that, in order to better ensure the spatio-temporal data processing model, a small amount of data can be used for training to learn the differences between the spatio-temporal data corresponding to regions with different attribute information. In this disclosure, the first reference region is attribute information In a case where at least one piece of attribute information is the same as the attribute information of any area, the apparatus may use an area that is different from each attribute information in the attribute information of any area as the second reference area.
在一些实施例中,本公开中,也可以从训练数据集中获取与任一区域的各个属性信息均相同的第一参考区域关联的第一参考时空数据;相应的,从训练数据集中获取与任一区域的各个属性信息中至少一个属性信息不同的第二参考区域关联的第二参考时空数据。In some embodiments, in the present disclosure, the first reference spatio-temporal data associated with the first reference region that has the same attribute information of any region can also be obtained from the training data set; Second reference spatio-temporal data associated with a second reference area with at least one attribute information different among each attribute information of an area.
步骤S204,将目标时空数据、第一参考时空数据及第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。Step S204, input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data respectively into the spatio-temporal data processing model to be trained to obtain the first data representation, the second data representation and the third data representation respectively.
步骤需要说明的是,步骤S204的具体实现过程可以参照上述实施例,在此不进行赘述。Steps It should be noted that, the specific implementation process of step S204 can refer to the above-mentioned embodiment, which will not be repeated here.
步骤S205,在第一数据表征与第二数据表征间的第一差异度大于或等于第一阈值,或者,第一数据表征与第三数据表征间的第二差异度小于或等于第二阈值的情况下,返回执行从训练数据集中抽取目标时空数据的操作,直至由待训练的时空数据处理模型新生成的第一数据表征与新生成的第二数据表征间的第一差异度小于第一阈值、且第一数据表征与新生成的第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。Step S205, the first degree of difference between the first data representation and the second data representation is greater than or equal to the first threshold, or the second difference between the first data representation and the third data representation is less than or equal to the second threshold In this case, return to the operation of extracting the target spatio-temporal data from the training data set until the first difference between the first data representation newly generated by the spatio-temporal data processing model to be trained and the newly generated second data representation is less than the first threshold , and when the second degree of difference between the first data representation and the newly generated third data representation is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
需要说明的是,在第一数据表征与第二数据表征间的第一差异度大于或等于第一阈值,则说明时空数据处理模型处理后得到的任一区域与第一参考区域的时空数据表征之间的差异较大,而由于任一区域与第一参考区域的属性信息相同,即二者对应的时空数据表征应该相同或相似,从而即可说明此时的时空数据处理模型不准确,不能满足结束神经网络训练模型训练的条件,则该装置将继续返回执行从训练数据集中抽取目标时空数据的操作。It should be noted that if the first degree of difference between the first data representation and the second data representation is greater than or equal to the first threshold, it means that the spatio-temporal data representation of any region obtained after processing by the spatio-temporal data processing model and the first reference region The difference between them is relatively large, and since the attribute information of any region is the same as that of the first reference region, that is, the corresponding spatiotemporal data representations of the two should be the same or similar, which means that the spatiotemporal data processing model at this time is inaccurate and cannot If the condition for ending the training of the neural network training model is met, the device will continue to return to the operation of extracting target spatio-temporal data from the training data set.
在一些实施例中,第一数据表征与第三数据表征间的第二差异度小于或等于第二阈值,则说明时空数据处理模型处理后得到的任一区域与第二参考区域的时空数据表征之间的差异较小,而由于任一区域与第二参考区域的属性信息不同,即二者对应的时空数据表征应该不同或差异较大,从而即可说明此时的时空数据处理模型不准确,不能满足结束神经网络训练模型训练的条件,则该装置将继续返回执行从训练数据集中抽取目标时空数据的操作。In some embodiments, if the second degree of difference between the first data representation and the third data representation is less than or equal to the second threshold, it means that the spatio-temporal data representation of any region obtained after processing by the spatio-temporal data processing model and the second reference region The difference between them is small, and because the attribute information of any region is different from the second reference region, that is, the corresponding spatiotemporal data representations of the two should be different or have a large difference, which can explain that the spatiotemporal data processing model at this time is inaccurate , the condition for ending the training of the neural network training model cannot be met, then the device will continue to return to the operation of extracting the target spatiotemporal data from the training data set.
进一步地,在返回执行从训练数据集中抽取目标时空数据的操作之后,若待训练的时空数据处理模型新生成的第一数据表征与新生成的第二数据表征间的第一差异度小于第一阈值、且第一数据表征与新生成的第三数据表征间的第二差异度大于第二阈值,则可以结束时空数据处理模型的训练过程。Further, after returning to the operation of extracting the target spatio-temporal data from the training data set, if the first difference between the newly generated first data representation and the newly generated second data representation of the spatio-temporal data processing model to be trained is less than the first threshold, and the second degree of difference between the first data representation and the newly generated third data representation is greater than the second threshold, then the training process of the spatio-temporal data processing model may end.
本公开实施例中该装置首先从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息,然后从训练数据 集中获取与任一区域的属性信息中至少一个属性信息相同的第一参考区域关联的第一参考时空数据,从训练数据集中获取与任一区域的属性信息中各个属性信息均不相同的第二参考区域关联的第二参考时空数据,之后将目标时空数据、第一参考时空数据及第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征,最后在第一数据表征与第二数据表征间的第一差异度大于或等于第一阈值,或者,第一数据表征与第三数据表征间的第二差异度小于或等于第二阈值的情况下,返回执行从训练数据集中抽取目标时空数据的操作,直至由待训练的时空数据处理模型新生成的第一数据表征与新生成的第二数据表征间的第一差异度小于第一阈值、且第一数据表征与新生成的第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。由此,利用对比自监督学习,可以利用大量低质量数据辅助训练时空数据处理模型,从而利用训练生成的时刻数据处理模型,即可对低质量的时空数据进行处理,以得到更准确、更可靠的时空数据表征。In the embodiment of the present disclosure, the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set The first reference spatio-temporal data associated with at least one of the attribute information of the region is the same as the first reference region, and the first reference region associated with the second reference region that is different in the attribute information of any region is obtained from the training data set. 2. Reference spatio-temporal data, and then input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained to obtain the first data representation, the second data representation and the third data respectively representation, finally the first degree of difference between the first data representation and the second data representation is greater than or equal to the first threshold, or the second difference between the first data representation and the third data representation is less than or equal to the second threshold In this case, return to the operation of extracting the target spatio-temporal data from the training data set until the first difference between the first data representation newly generated by the spatio-temporal data processing model to be trained and the newly generated second data representation is less than the first threshold , and when the second degree of difference between the first data representation and the newly generated third data representation is greater than the second threshold, the training process of the spatio-temporal data processing model ends. Therefore, using comparative self-supervised learning, a large amount of low-quality data can be used to assist in training the spatio-temporal data processing model, so that the time data processing model generated by training can be used to process low-quality spatio-temporal data to obtain more accurate and reliable spatiotemporal data representation.
图3是根据本公开又一实施例的时空数据处理模型的训练方法的流程示意图。Fig. 3 is a schematic flowchart of a training method for a spatio-temporal data processing model according to yet another embodiment of the present disclosure.
如图3所示,该时空数据处理模型的训练方法可以包括以下步骤:As shown in Figure 3, the training method of the spatio-temporal data processing model may include the following steps:
步骤S301,从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息。Step S301 , extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region.
在一些实施例中,各个区域关联的时空数据可以包括每个区域对应的通信数据序列、属性图谱、人口属性及定位数据序列,对此不进行限定。In some embodiments, the spatio-temporal data associated with each area may include a communication data sequence, attribute map, population attribute, and positioning data sequence corresponding to each area, which is not limited.
需要说明的是,属性图谱可以为该装置基于已知的区域的属性信息构建的,举例来说,可以以区域作为节点,以路网距离作为边长,以区域的属性信息比如房价、人流量作为各个节点的属性,对此不进行限定。人口属性,可以为该装置基于获取的定位数据集通信数据分析的所得到的,比如,可以为人口年龄分布、人口性别分布等等。对此不进行限定。It should be noted that the attribute map can be constructed by the device based on the known attribute information of the region. For example, the region can be used as a node, the distance of the road network can be used as the side length, and the attribute information of the region such as house price, traffic flow This is not limited as an attribute of each node. The population attribute may be obtained by the device based on the analysis of the acquired positioning data set and communication data, for example, it may be population age distribution, population gender distribution, and the like. This is not limited.
在一些实施例中,训练数据集中还可以包括每个区域对应的标注标签,比如每个区域的交通状况、是否发生聚集事件等,对此不进行限定。In some embodiments, the training data set may also include labels corresponding to each area, such as the traffic conditions of each area, whether an aggregation event occurs, etc., which is not limited.
步骤S302,从训练数据集中获取与任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与任一区域的属性信息不同的第二参考区域关联的第二参考时空数据。Step S302, acquiring first reference spatio-temporal data associated with a first reference area with the same attribute information of any area and second reference spatio-temporal data associated with a second reference area with different attribute information of any area from the training data set .
需要说明的是,步骤S302的具体实现过程可以参照上述任一实施例,在此不进行赘述。It should be noted that, the specific implementation process of step S302 may refer to any of the foregoing embodiments, and details are not described here.
步骤S303,利用待训练的知识融合网络,将任一区域、第一参考区域及第二参考区域分别对应的通信数据序列、属性图谱、人口属性及定位数据序列进行融合,以获取融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据。Step S303, use the knowledge fusion network to be trained to fuse the communication data sequence, attribute map, population attribute and positioning data sequence corresponding to any region, the first reference region and the second reference region respectively, so as to obtain the fused target Spatio-temporal data, fused first reference spatio-temporal data and second reference spatio-temporal data.
本公开中,可以利用待训练的知识融合网络,将任一区域、第一参考区域及第二参考区域分别对应的通信数据序列、属性图谱、人口属性及定位数据序列等数据利用待训练的知识融合网络进行融合,从而可以使融合后的目标时空数据、第一参考时空数据及第二参 考时空数据具有对应区域的时空数据和属性信息。In this disclosure, the knowledge fusion network to be trained can be used to use the knowledge to be trained to use the data such as the communication data sequence, attribute map, population attribute, and positioning data sequence corresponding to any area, the first reference area, and the second reference area. The fusion network performs fusion, so that the fused target spatio-temporal data, the first reference spatio-temporal data, and the second reference spatio-temporal data have spatio-temporal data and attribute information of corresponding regions.
在一些实施例中,本公开中,可以利用交换对比损失(Swapped Contrastive Loss)机制,从一个区域的时空数据表征,来预测另一区域的时空数据表征,这样就可以用较小的批次数据来训练网络,减小模型训练过程中对内存的需求。In some embodiments, in this disclosure, the Swapped Contrastive Loss mechanism can be used to predict the spatiotemporal data representation of another region from the spatiotemporal data representation of one region, so that smaller batch data can be used To train the network and reduce the memory requirements during model training.
如图4所示,本公开中可以采用图4所示模型预训练的框架图,利用交换对比损失机制对模型进行训练。如图4所示,时空数据处理模型的训练框架,可以分为两类网络,一类是原型网(prototype)网络,它是一个全连接网络(full-connection)网络,主要承担表征计算的任务,并且在计算目标数据和增强数据时共享网络参数。另一类是骨干网(backbone network),主要完成多源数据融合和特征提取的任务。As shown in FIG. 4 , the frame diagram of model pre-training shown in FIG. 4 can be adopted in the present disclosure, and the model can be trained by using the exchange contrast loss mechanism. As shown in Figure 4, the training framework of the spatio-temporal data processing model can be divided into two types of networks, one is the prototype network (prototype) network, which is a full-connection network (full-connection) network, which mainly undertakes the task of representation calculation , and share network parameters when computing target data and augmented data. The other is the backbone network, which mainly completes the tasks of multi-source data fusion and feature extraction.
需要说明的是,骨干网与图4中的时空知识融合网络相对应,原型网与图4中的编码网络相对应。It should be noted that the backbone network corresponds to the spatio-temporal knowledge fusion network in Figure 4, and the prototype network corresponds to the encoding network in Figure 4.
在一些实施例中,可以使用swapped contrastive loss来优化网络的参数,它的表达式可以为:In some embodiments, swapped contrastive loss can be used to optimize the parameters of the network, and its expression can be:
L(o t,o s)=L(o t,q s)+L(q t,o s) L(o t ,o s )=L(o t ,q s )+L(q t ,o s )
其中,o t和o s可以为backbone网络的输出,q t和q s可以为原型网(prototype)的输出,L为交叉熵损失函数。 Among them, o t and o s can be the output of the backbone network, q t and q s can be the output of the prototype network (prototype), and L is the cross-entropy loss function.
需要说明的是,L(o t,q s)可以通过下式进行计算: It should be noted that L(o t ,q s ) can be calculated by the following formula:
Figure PCTCN2022086925-appb-000001
Figure PCTCN2022086925-appb-000001
Figure PCTCN2022086925-appb-000002
Figure PCTCN2022086925-appb-000002
其中,τ为温度参数,k为原型网网络的数量。Among them, τ is the temperature parameter, and k is the number of protonet networks.
为方便说明,举例来说,以i作为任一区域对应的节点,以边d i,j表示相邻节点j到任一区域之间的距离,以P a和P c作为各个区域对应的节点的两种内在的特征,其中,每个P a里面包含了区域的面积,交通情况和位置,每个P c包含了区域人口画像,比如,年龄和性别,以动态手机定位的报点数据
Figure PCTCN2022086925-appb-000003
反应区域中的人流量情况,对此不进行限定。
For the convenience of description, for example, take i as the node corresponding to any area, use the side d i, j to represent the distance between the adjacent node j and any area, and use P a and P c as the nodes corresponding to each area The two intrinsic features of , among them, each P a contains the area, traffic conditions and location of the region, and each P c contains the regional population portrait, such as age and gender, and the reporting point data of dynamic mobile phone positioning
Figure PCTCN2022086925-appb-000003
The flow of people in the reaction area is not limited.
进一步地,对P a和P c进行编码,具体公式如下: Further, to encode P a and P c , the specific formula is as follows:
Figure PCTCN2022086925-appb-000004
Figure PCTCN2022086925-appb-000004
Figure PCTCN2022086925-appb-000005
Figure PCTCN2022086925-appb-000005
其中,
Figure PCTCN2022086925-appb-000006
表示第i个节点在网络中的输入,
Figure PCTCN2022086925-appb-000007
Figure PCTCN2022086925-appb-000008
分别代表两个embedding(嵌入)网络f a和f c的输入,θ a和θ c则分别代表两个embedding网络的参数。
in,
Figure PCTCN2022086925-appb-000006
Indicates the input of the i-th node in the network,
Figure PCTCN2022086925-appb-000007
and
Figure PCTCN2022086925-appb-000008
Represent the input of two embedding (embedding) networks f a and f c respectively, and θ a and θ c represent the parameters of the two embedding networks respectively.
之后,可以利用消息传递网络(Message Passing Neural Network,MPNN)进行表征学习,其中,边网络可以表示为:Afterwards, representation learning can be performed using the Message Passing Neural Network (MPNN), where the edge network can be expressed as:
e ij=f e(w ij;θ e) e ij = f e (w ij ; θ e )
Figure PCTCN2022086925-appb-000009
Figure PCTCN2022086925-appb-000009
其中,w ij为边网络的输入,θ e是待学习的参数,最后消息传递网络可以定义为: Among them, w ij is the input of the edge network, θ e is the parameter to be learned, and finally the message passing network can be defined as:
Figure PCTCN2022086925-appb-000010
Figure PCTCN2022086925-appb-000010
其中,θ g为readout(读出)网络的参数。 Among them, θ g is the parameter of the readout (reading) network.
通过上述利用交换对比损失机制,可以实现对待训练的知识融合网络的网络参数的优化,由此可以获取更为准确的目标时空数据、第一参考时空数据及第二参考时空数据。By using the exchange-comparison loss mechanism above, network parameters of the knowledge fusion network to be trained can be optimized, thereby obtaining more accurate target spatio-temporal data, first reference spatio-temporal data, and second reference spatio-temporal data.
需要说明的是,上述举例仅为示意性说明,本公开对此不进行限定。It should be noted that the above examples are only for illustrative purposes, and the present disclosure does not limit them.
步骤S304,将融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据,分别输入所述待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。Step S304, respectively input the fused target spatio-temporal data, fused first reference spatio-temporal data and second reference spatio-temporal data into the spatio-temporal data processing model to be trained, so as to respectively obtain the first data representation, the second data representation Representation and third data representation.
步骤S305,在第一数据表征与第二数据表征间的第一差异度小于第一阈值、且第一数据表征与第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。Step S305, when the first degree of difference between the first data representation and the second data representation is smaller than the first threshold, and the second difference between the first data representation and the third data representation is greater than the second threshold, end the spatio-temporal The training process of the data processing model.
需要说明的是,S304,S305的具体实现过程可以参照上述任一实施例,在此不进行赘述。It should be noted that, the specific implementation process of S304 and S305 may refer to any of the foregoing embodiments, and details are not described here.
步骤S306,将每个区域关联的时空数据输入训练生成的时空数据处理模型中,以获取每个区域对应的数据表征。Step S306, input the spatio-temporal data associated with each region into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each region.
需要说明的是,在结束时空数据处理模型的训练过程之后,该装置可以将每个区域关联的时空数据输入训练生成的时空数据处理模型,从而获得每个区域对应的数据表征。可以理解的是,数据表征可以以静态的图结构的形式、或者向量的形式,表征每个区域关联的时空数据,对此不进行限定。It should be noted that after the training process of the spatio-temporal data processing model is completed, the device can input the spatio-temporal data associated with each region into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each region. It can be understood that the data representation may represent the spatio-temporal data associated with each region in the form of a static graph structure or in the form of a vector, which is not limited.
作为一种示例,图5示出了一种多源数据融合的人口推断框架图,上述实施例中将获取各个区域的时空数据和属性信息之前,需要对各个区域的各类数据的时空特征进行抽取和构造,以获取个区域对应的通信数据序列、属性图谱、人口属性及定位数据序列等时空数据。如图5所示,各类数据可以为电商数据、出行数据、租房数据、路网数据以及兴趣点(Point of Interest,POI)数据等,该装置可以通过对各个地域的各类数据信息进行时空特征的抽取以及构造,以获得属性图谱、通信数据序列及定位数据序列等时空数据。之后通过对比自监督模型训练,利用时空深度知识融合网,也即上述实施例中的知识融合网络将任一区域、第一参考区域及第二参考区域分别对应的通信数据序列、属性图谱、人口属性及定位数据序列进行融合,之后利用上述时空数据处理模型将各个融合后的数据作为输入,以获得各个数据表征。最后该装置可以将各个数据表征输入时空预测器中,从而获取各个区域的预测人流量,也即推断值。As an example, Figure 5 shows a population inference frame diagram of multi-source data fusion. In the above-mentioned embodiment, before obtaining the spatio-temporal data and attribute information of each area, it is necessary to carry out the spatio-temporal characteristics of various types of data in each area Extraction and construction to obtain spatio-temporal data such as communication data sequences, attribute maps, population attributes, and positioning data sequences corresponding to each region. As shown in Figure 5, various types of data can be e-commerce data, travel data, rental data, road network data, and point of interest (POI) data. The extraction and construction of spatio-temporal features to obtain spatio-temporal data such as attribute maps, communication data sequences, and positioning data sequences. Afterwards, by comparing self-supervised model training, using the spatio-temporal deep knowledge fusion network, that is, the knowledge fusion network in the above embodiment, the communication data sequence, attribute map, and population corresponding to any area, the first reference area, and the second reference area are respectively The attributes and positioning data sequences are fused, and then the above-mentioned spatio-temporal data processing model is used to take each fused data as input to obtain each data representation. Finally, the device can input each data representation into the space-time predictor, so as to obtain the predicted flow of people in each area, that is, the inferred value.
步骤S307,将每个区域对应的数据表征输入待训练的预测模型,以获取每个区域对 应的预测标签。Step S307, input the data representation corresponding to each region into the prediction model to be trained, so as to obtain the prediction label corresponding to each region.
需要说明的是,预测标签可以为对每个区域的属性信息的预测标签,比如括人流量预测情况、交通状况预测情况、性别分布预测情况等,或者还可以为人群聚集情况、营销决策、交通调度决策等信息,对此不进行限定。It should be noted that the prediction label can be a prediction label for the attribute information of each area, such as the prediction of the flow of people, the prediction of the traffic condition, the prediction of the gender distribution, etc., or it can also be the prediction of the crowd gathering situation, marketing decision, traffic Scheduling decisions and other information are not limited.
可以理解的是,对于不同的具体任务,该装置通过预测模型获取的对应的预测标签也可以是不同的,具体来说,对于人流量预测任务,所获取的预测标签可以是该区域对应的人流量,对此不进行限定。It can be understood that for different specific tasks, the corresponding prediction labels obtained by the device through the prediction model may also be different. flow, which is not limited.
步骤S308,根据预测标签与标注标签的差异,对预测模型及训练生成的时空数据处理模型分别进行修正。In step S308, the prediction model and the spatio-temporal data processing model generated by training are corrected respectively according to the difference between the predicted label and the labeled label.
在一些实施例中,该装置可以将预测标签与标注标签进行比较,以确定预测标签与标注标签之间的差异,比如,可以使用梯度下降、随机梯度下降等方式确定出修正梯度,进而以此对预测模型及训练生成的时空数据处理模型分别进行修正,本公开对确定修正梯度的方式不做限定。In some embodiments, the device can compare the predicted label with the labeled label to determine the difference between the predicted label and the labeled label. For example, gradient descent, stochastic gradient descent, etc. can be used to determine the corrected gradient. The prediction model and the spatio-temporal data processing model generated by training are respectively corrected, and the method of determining the correction gradient is not limited in the present disclosure.
在一些实施例中,还可以通过知识融合网络的交叉损失,利用回归网络对时空数据处理模型进行参数的修正。In some embodiments, the regression network can also be used to modify the parameters of the spatio-temporal data processing model through the cross loss of the knowledge fusion network.
在一些实施例中,可以使用先前已经训练过的backbone网络和另一个待训练的回归网络进行具体任务的微调和推测,具体公式如下:In some embodiments, the previously trained backbone network and another regression network to be trained can be used to fine-tune and infer specific tasks, and the specific formula is as follows:
Figure PCTCN2022086925-appb-000011
Figure PCTCN2022086925-appb-000011
其中,o t是backbone网络的输出,θ o是回归网络f o的参数,σ为sigmoid激活函数。为了更好地训练模型,可以使用全训练策略,将backbone网络和回归网络一起在有标签数据下继续训练,形式化地表示为: Among them, o t is the output of the backbone network, θ o is the parameter of the regression network f o , and σ is the sigmoid activation function. In order to better train the model, a full training strategy can be used to continue training the backbone network and the regression network together under labeled data, which is formally expressed as:
Figure PCTCN2022086925-appb-000012
Figure PCTCN2022086925-appb-000012
θ b={θ acegns} θ b ={θ acegns }
其中,L为损失函数,α是学习率,η为衰减系数。Among them, L is the loss function, α is the learning rate, and η is the decay coefficient.
本公开实施例中该装置首先从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息,然后从训练数据集中获取与任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与任一区域的属性信息不同的第二参考区域关联的第二参考时空数据,之后利用待训练的知识融合网络,将任一区域、第一参考区域及第二参考区域分别对应的通信数据序列、属性图谱、人口属性及定位数据序列进行融合,以获取融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据,在第一数据表征与第二数据表征间的第一差异度小于第一阈值、且第一数据表征与第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程,之后将每个区域关联的时空数据输入训练生成的时空数据处理模型中,以获取每个区域对应的数据表征,最后将每个区域对应的数据表征输入待训练的预测模型,以获取每个区域对应的预测标签。由此,通过多源时空数据融合,可以提高预测 模型的准确性,且可以在优化模型的同时实现模型的微调,实现了用少量的数据进行训练,达到近似全量训练数据效果的目的。In the embodiment of the present disclosure, the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set The first reference space-time data associated with the first reference area with the same attribute information of the area, and the second reference space-time data associated with the second reference area with different attribute information of any area, and then using the knowledge fusion network to be trained, the The communication data sequence, attribute map, population attribute and positioning data sequence respectively corresponding to any region, the first reference region and the second reference region are fused to obtain the fused target spatio-temporal data, the fused first reference spatio-temporal data and Second reference spatio-temporal data, when the first degree of difference between the first data representation and the second data representation is less than the first threshold, and the second difference between the first data representation and the third data representation is greater than the second threshold , end the training process of the spatiotemporal data processing model, and then input the spatiotemporal data associated with each region into the spatiotemporal data processing model generated by training to obtain the data representation corresponding to each region, and finally input the data representation corresponding to each region to be A predicted model trained to obtain the corresponding predicted label for each region. Therefore, through the fusion of multi-source spatiotemporal data, the accuracy of the prediction model can be improved, and the fine-tuning of the model can be realized while optimizing the model, realizing the purpose of training with a small amount of data and achieving the effect of approximating the effect of full training data.
为了实现上述实施例,本公开实施例还提出一种时空数据处理模型的训练装置。图6为本公开实施例提供的一种时空数据处理模型的训练装置的结构框图。In order to realize the above-mentioned embodiments, the embodiments of the present disclosure further propose a training device for a spatio-temporal data processing model. FIG. 6 is a structural block diagram of a training device for a spatio-temporal data processing model provided by an embodiment of the present disclosure.
如图6所示,该时空数据处理模型的训练装置包括:抽取模块610、第一获取模块620、第二获取模块630及判断模块640。As shown in FIG. 6 , the training device for the spatio-temporal data processing model includes: an extraction module 610 , a first acquisition module 620 , a second acquisition module 630 and a judgment module 640 .
抽取模块,用于从训练数据集中抽取任一区域关联的目标时空数据,其中,所述训练数据集中包括各个区域关联的时空数据及各个区域的属性信息;An extraction module, configured to extract target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region;
第一获取模块,用于从所述训练数据集中获取与所述任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与所述任一区域的属性信息不同的第二参考区域关联的第二参考时空数据;The first acquisition module is configured to acquire, from the training data set, first reference space-time data associated with a first reference area that is the same as the attribute information of any area, and a first reference space-time data that is different from the attribute information of any area. Second reference spatio-temporal data associated with the second reference area;
第二获取模块,用于将所述目标时空数据、所述第一参考时空数据及所述第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征;The second acquisition module is configured to respectively input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained, so as to respectively acquire the first data representation, the second reference spatio-temporal data Two data representations and a third data representation;
判断模块,用于在所述第一数据表征与所述第二数据表征间的第一差异度小于第一阈值、且所述第一数据表征与所述第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。A judging module, configured to have a first degree of difference between the first data representation and the second data representation less than a first threshold, and a second degree of difference between the first data representation and the third data representation If it is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
在一些实施例中,所述区域的属性信息包括所述区域的面积、人口及所属的类型,所述第一获取模块,具体用于:In some embodiments, the attribute information of the region includes the area, population and type of the region, and the first acquisition module is specifically used for:
从所述训练数据集中获取与所述任一区域的属性信息中至少一个属性信息相同的第一参考区域关联的第一参考时空数据;Obtaining first reference spatio-temporal data associated with a first reference region that is identical to at least one attribute information in the attribute information of any region from the training data set;
从所述训练数据集中获取与所述任一区域的属性信息中各个属性信息均不相同的第二参考区域关联的第二参考时空数据。The second reference spatio-temporal data associated with the second reference region whose attribute information is different in the attribute information of any region is obtained from the training data set.
在一些实施例中,所述区域的属性信息包括所述区域的面积、人口及所属的类型,所述第一获取模块,具体用于:In some embodiments, the attribute information of the region includes the area, population and type of the region, and the first acquisition module is specifically used for:
从所述训练数据集中获取与所述任一区域的各个属性信息均相同的第一参考区域关联的第一参考时空数据;Acquiring first reference spatio-temporal data associated with a first reference region having the same attribute information of any region from the training data set;
从所述训练数据集中获取与所述任一区域的各个属性信息中至少一个属性信息不同的第二参考区域关联的第二参考时空数据。Second reference spatio-temporal data associated with a second reference region that is different from at least one attribute information of each attribute information of any region is acquired from the training data set.
在一些实施例中,所述装置,还包括:In some embodiments, the device further includes:
第一确定模块,用于根据所述任一区域的属性信息与所述第一参考区域的属性信息的第一匹配度,确定所述第一阈值;A first determining module, configured to determine the first threshold according to a first degree of matching between the attribute information of any region and the attribute information of the first reference region;
第二确定模块,用于根据所述任一区域的属性信息与所述第二参考区域的属性信息的第二匹配度,确定所述第二阈值。The second determining module is configured to determine the second threshold according to a second degree of matching between the attribute information of any region and the attribute information of the second reference region.
在一些实施例中,所述判断模块,还用于:In some embodiments, the judging module is also used for:
在所述第一数据表征与所述第二数据表征间的第一差异度大于或等于第一阈值,或者,所述第一数据表征与所述第三数据表征间的第二差异度小于或等于第二阈值的情况下,返回执行所述从所述训练数据集中抽取目标时空数据的操作,直至由待训练的时空数据处理模型新生成的第一数据表征与新生成的第二数据表征间的第一差异度小于第一阈值、且所述第一数据表征与新生成的第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。The first degree of difference between the first data representation and the second data representation is greater than or equal to a first threshold, or the second degree of difference between the first data representation and the third data representation is less than or If it is equal to the second threshold, return to the operation of extracting the target spatio-temporal data from the training data set until the gap between the first data representation newly generated by the spatio-temporal data processing model to be trained and the newly generated second data representation When the first degree of difference between the first data representation and the newly generated third data representation is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
在一些实施例中,所述训练数据集中还包括每个所述区域对应的标注标签,所述装置还包括:In some embodiments, the training data set also includes annotated labels corresponding to each of the regions, and the device further includes:
第三获取模块,用于将每个所述区域关联的时空数据输入训练生成的时空数据处理模型中,以获取每个所述区域对应的数据表征;The third acquisition module is used to input the spatio-temporal data associated with each of the regions into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each of the regions;
第四获取模块,用于将每个所述区域对应的数据表征输入待训练的预测模型,以获取每个所述区域对应的预测标签;The fourth acquisition module is used to input the data representation corresponding to each of the regions into the prediction model to be trained, so as to obtain the prediction labels corresponding to each of the regions;
修正模块,用于根据所述预测标签与所述标注标签的差异,对所述预测模型及所述训练生成的时空数据处理模型分别进行修正。The correction module is configured to correct the prediction model and the spatio-temporal data processing model generated by the training according to the difference between the prediction label and the label label.
在一些实施例中,每个所述区域关联的时空数据,包括每个区域对应的通信数据序列、属性图谱、人口属性及定位数据序列,所述第二获取模块,还用于:In some embodiments, the spatio-temporal data associated with each of the regions includes communication data sequences, attribute maps, population attributes and positioning data sequences corresponding to each region, and the second acquisition module is also used to:
利用待训练的知识融合网络,将所述任一区域、第一参考区域及第二参考区域分别对应的通信数据序列、属性图谱、人口属性及定位数据序列进行融合,以获取融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据;Using the knowledge fusion network to be trained, fuse the communication data sequence, attribute map, population attribute and positioning data sequence respectively corresponding to the arbitrary region, the first reference region and the second reference region, so as to obtain the fused target space-time data, fused first reference spatio-temporal data and second reference spatio-temporal data;
将所述融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据,分别输入所述待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。Input the fused target spatio-temporal data, fused first reference spatio-temporal data and second reference spatio-temporal data into the spatio-temporal data processing model to be trained respectively to obtain the first data representation and the second data representation and the third data representation.
本公开实施例中该装置首先从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息,然后从训练数据集中获取与任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与任一区域的属性信息不同的第二参考区域关联的第二参考时空数据,之后将目标时空数据、第一参考时空数据及第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。最后在第一数据表征与第二数据表征间的第一差异度小于第一阈值、且第一数据表征与第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。由此,通过利用时空数据的对比自监督学习,即可生成时空数据处理模型,从而可以对时空数据进行处理,以获取准确、可靠的时空数据表征,为在精准的时空数据不足的情况下提高时空预测的准确率提供了条件。In the embodiment of the present disclosure, the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set The first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area, and then the target spatio-temporal data, the first reference spatio-temporal data The data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively. Finally, when the first degree of difference between the first data representation and the second data representation is less than the first threshold, and the second degree of difference between the first data representation and the third data representation is greater than the second threshold, the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质、一种计算机程序产品和一种计算机程序。According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, a computer program product, and a computer program.
根据本公开的实施例,电子设备包括:According to an embodiment of the present disclosure, an electronic device includes:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述实施例所述的时空数据处理模型的训练方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the spatiotemporal data processing model described in the above-mentioned embodiments. training method.
根据本公开的实施例,可读存储介质是非瞬时计算机可读存储介质。非瞬时计算机可读存储介质存储有计算机指令,所述计算机指令用于使所述计算机执行上述实施例所述的时空数据处理模型的训练方法。According to an embodiment of the present disclosure, the readable storage medium is a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the spatio-temporal data processing model training method described in the above-mentioned embodiments.
根据本公开的实施例,计算机程序产品包括计算机程序,所述计算机程序在被处理器执行时实现上述实施例所述的时空数据处理模型的训练方法。According to an embodiment of the present disclosure, the computer program product includes a computer program, and when the computer program is executed by a processor, the method for training the spatio-temporal data processing model described in the above embodiments is implemented.
根据本公开的实施例,计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行上述实施例所述的时空数据处理模型的训练方法。图7示出了可以用来实施本公开的实施例的示例电子设备700的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。According to an embodiment of the present disclosure, the computer program includes computer program code, and when the computer program code is run on the computer, the computer executes the method for training the spatio-temporal data processing model described in the above embodiments. FIG. 7 shows a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图7所示,设备700包括计算单元701,其可以根据存储在只读存储器(ROM)702中的计算机程序或者从存储单元708加载到随机访问存储器(RAM)703中的计算机程序,来执行各种适当的动作和处理。在RAM 703中,还可存储设备700操作所需的各种程序和数据。计算单元701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。As shown in FIG. 7, the device 700 includes a computing unit 701 that can execute according to a computer program stored in a read-only memory (ROM) 702 or loaded from a storage unit 708 into a random-access memory (RAM) 703. Various appropriate actions and treatments. In the RAM 703, various programs and data necessary for the operation of the device 700 can also be stored. The computing unit 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to the bus 704 .
设备700中的多个部件连接至I/O接口705,包括:输入单元706,例如键盘、鼠标等;输出单元707,例如各种类型的显示器、扬声器等;存储单元708,例如磁盘、光盘等;以及通信单元709,例如网卡、调制解调器、无线通信收发机等。通信单元709允许设备700通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the device 700 are connected to the I/O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc. ; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 709 allows the device 700 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
计算单元701可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元701的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元701执行上文所描述的各个方法和处理,例如时空数据处理模型的训练方法。例如,在一些实施例中,时空数据处理模型的训练方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元708。在一些实施例中,计算机程序的部分或者全部可以经由ROM 702和/或 通信单元709而被载入和/或安装到设备700上。当计算机程序加载到RAM 703并由计算单元701执行时,可以执行上文描述的时空数据处理模型的训练方法的一个或多个步骤。备选地,在其他实施例中,计算单元701可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行时空数据处理模型的训练方法。The computing unit 701 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 701 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The calculation unit 701 executes various methods and processes described above, such as a training method of a spatio-temporal data processing model. For example, in some embodiments, the method for training a spatio-temporal data processing model may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708 . In some embodiments, part or all of the computer program may be loaded and/or installed on the device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the training method of the spatio-temporal data processing model described above can be performed. Alternatively, in other embodiments, the computing unit 701 may be configured in any other appropriate way (for example, by means of firmware) to execute the training method of the spatio-temporal data processing model.
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台 部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、互联网和区块链网络。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务("Virtual Private Server",或简称"VPS")中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the problem of traditional physical host and VPS service ("Virtual Private Server", or "VPS") Among them, there are defects such as difficult management and weak business scalability. The server can also be a server of a distributed system, or a server combined with a blockchain.
本公开实施例中该装置首先从训练数据集中抽取任一区域关联的目标时空数据,其中,训练数据集中包括各个区域关联的时空数据及各个区域的属性信息,然后从训练数据集中获取与任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与任一区域的属性信息不同的第二参考区域关联的第二参考时空数据,之后将目标时空数据、第一参考时空数据及第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。最后在第一数据表征与第二数据表征间的第一差异度小于第一阈值、且第一数据表征与第三数据表征间的第二差异度大于第二阈值的情况下,结束时空数据处理模型的训练过程。由此,通过利用时空数据的对比自监督学习,即可生成时空数据处理模型,从而可以对时空数据进行处理,以获取准确、可靠的时空数据表征,为在精准的时空数据不足的情况下提高时空预测的准确率提供了条件。In the embodiment of the present disclosure, the device first extracts the target spatio-temporal data associated with any region from the training data set, wherein the training data set includes the spatio-temporal data associated with each region and the attribute information of each region, and then obtains the target spatio-temporal data associated with any region from the training data set The first reference spatio-temporal data associated with the first reference area with the same attribute information of the area, and the second reference spatio-temporal data associated with the second reference area with different attribute information of any area, and then the target spatio-temporal data, the first reference spatio-temporal data The data and the second reference spatio-temporal data are respectively input into the spatio-temporal data processing model to be trained, so as to obtain the first data representation, the second data representation and the third data representation respectively. Finally, when the first degree of difference between the first data representation and the second data representation is less than the first threshold, and the second degree of difference between the first data representation and the third data representation is greater than the second threshold, the spatio-temporal data processing ends The training process of the model. Therefore, by using comparative self-supervised learning of spatio-temporal data, a spatio-temporal data processing model can be generated, so that spatio-temporal data can be processed to obtain accurate and reliable spatio-temporal data representations, and to improve The accuracy of spatiotemporal prediction provides the conditions.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The specific implementation manners described above do not limit the protection scope of the present disclosure. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the principles of the present disclosure shall be included within the protection scope of the present disclosure.

Claims (18)

  1. 一种时空数据处理模型的训练方法,其特征在于,包括:A training method for a spatio-temporal data processing model, comprising:
    从训练数据集中抽取任一区域关联的目标时空数据,其中,所述训练数据集中包括各个区域关联的时空数据及各个区域的属性信息;Extracting target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region;
    从所述训练数据集中获取与所述任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与所述任一区域的属性信息不同的第二参考区域关联的第二参考时空数据;Obtain from the training data set the first reference spatio-temporal data associated with a first reference area with the same attribute information of any area, and the second reference area associated with a second reference area with different attribute information of any area. Reference spatiotemporal data;
    将所述目标时空数据、所述第一参考时空数据及所述第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征;Input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained respectively to obtain the first data representation, the second data representation and the third data representation;
    在所述第一数据表征与所述第二数据表征间的第一差异度小于第一阈值、且所述第一数据表征与所述第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。A first degree of difference between the first data representation and the second data representation is less than a first threshold, and a second degree of difference between the first data representation and the third data representation is greater than a second threshold case, end the training process of the spatio-temporal data processing model.
  2. 如权利要求1所述的方法,其特征在于,所述区域的属性信息包括所述区域的面积、人口及所属的类型,所述从所述训练数据集中获取与所述任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与所述任一区域的属性信息不同的第二参考区域关联的第二参考时空数据,包括:The method according to claim 1, wherein the attribute information of the region includes the area, population and type of the region, and the attribute information of any region obtained from the training data set is The first reference spatio-temporal data associated with the same first reference area, and the second reference spatio-temporal data associated with a second reference area that is different from the attribute information of any area, include:
    从所述训练数据集中获取与所述任一区域的属性信息中至少一个属性信息相同的第一参考区域关联的第一参考时空数据;Obtaining first reference spatio-temporal data associated with a first reference region that is identical to at least one attribute information in the attribute information of any region from the training data set;
    从所述训练数据集中获取与所述任一区域的属性信息中各个属性信息均不相同的第二参考区域关联的第二参考时空数据。The second reference spatio-temporal data associated with the second reference region whose attribute information is different in the attribute information of any region is obtained from the training data set.
  3. 如权利要求1所述的方法,其特征在于,所述区域的属性信息包括所述区域的面积、人口及所属的类型,所述从所述训练数据集中获取与所述任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与所述任一区域的属性信息不同的第二参考区域关联的第二参考时空数据,包括:The method according to claim 1, wherein the attribute information of the region includes the area, population and type of the region, and the attribute information of any region obtained from the training data set is The first reference spatio-temporal data associated with the same first reference area, and the second reference spatio-temporal data associated with a second reference area that is different from the attribute information of any area, include:
    从所述训练数据集中获取与所述任一区域的各个属性信息均相同的第一参考区域关联的第一参考时空数据;Acquiring first reference spatio-temporal data associated with a first reference region having the same attribute information of any region from the training data set;
    从所述训练数据集中获取与所述任一区域的各个属性信息中至少一个属性信息不同的第二参考区域关联的第二参考时空数据。Second reference spatio-temporal data associated with a second reference region that is different from at least one attribute information of each attribute information of any region is acquired from the training data set.
  4. 如权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    根据所述任一区域的属性信息与所述第一参考区域的属性信息的第一匹配度,确定所述第一阈值;determining the first threshold according to a first matching degree between the attribute information of any region and the attribute information of the first reference region;
    根据所述任一区域的属性信息与所述第二参考区域的属性信息的第二匹配度,确定所述第一阈值。The first threshold is determined according to a second matching degree between the attribute information of any region and the attribute information of the second reference region.
  5. 如权利要求1至4任一项所述的方法,其特征在于,在所述获取第一数据表征、 第二数据表征及第三数据表征之后,还包括:The method according to any one of claims 1 to 4, wherein, after said obtaining the first data representation, the second data representation and the third data representation, further comprising:
    在所述第一数据表征与所述第二数据表征间的第一差异度大于或等于第一阈值,或者,所述第一数据表征与所述第三数据表征间的第二差异度小于或等于第二阈值的情况下,返回执行所述从所述训练数据集中抽取目标时空数据的操作,直至由待训练的时空数据处理模型新生成的第一数据表征与新生成的第二数据表征间的第一差异度小于第一阈值、且所述第一数据表征与新生成的第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。The first degree of difference between the first data representation and the second data representation is greater than or equal to a first threshold, or the second degree of difference between the first data representation and the third data representation is less than or If it is equal to the second threshold, return to the operation of extracting the target spatio-temporal data from the training data set until the gap between the first data representation newly generated by the spatio-temporal data processing model to be trained and the newly generated second data representation When the first degree of difference between the first data representation and the newly generated third data representation is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
  6. 如权利要求1至5任一所述的方法,其特征在于,所述训练数据集中还包括每个所述区域对应的标注标签,所述方法还包括:The method according to any one of claims 1 to 5, wherein the training data set also includes labels corresponding to each of the regions, and the method also includes:
    将每个所述区域关联的时空数据输入训练生成的时空数据处理模型中,以获取每个所述区域对应的数据表征;Input the spatio-temporal data associated with each of the regions into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each of the regions;
    将每个所述区域对应的数据表征输入待训练的预测模型,以获取每个所述区域对应的预测标签;Inputting the data representation corresponding to each of the regions into the prediction model to be trained, so as to obtain the prediction labels corresponding to each of the regions;
    根据所述预测标签与所述标注标签的差异,对所述预测模型及所述训练生成的时空数据处理模型分别进行修正。The prediction model and the spatio-temporal data processing model generated by the training are respectively corrected according to the difference between the prediction label and the annotation label.
  7. 如权利要求6所述的方法,其特征在于,每个所述区域关联的时空数据,包括每个区域对应的通信数据序列、属性图谱、人口属性及定位数据序列,所述将所述目标时空数据、所述第一参考时空数据及所述第二参考时空数据,分别输入待训练的时空数据处理模型中,包括:The method according to claim 6, wherein the spatio-temporal data associated with each of the regions includes communication data sequences, attribute maps, population attributes, and positioning data sequences corresponding to each region, and the target spatio-temporal The data, the first reference spatiotemporal data and the second reference spatiotemporal data are respectively input into the spatiotemporal data processing model to be trained, including:
    利用待训练的知识融合网络,将所述任一区域、第一参考区域及第二参考区域分别对应的通信数据序列、属性图谱、人口属性及定位数据序列进行融合,以获取融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据;Using the knowledge fusion network to be trained, fuse the communication data sequence, attribute map, population attribute and positioning data sequence respectively corresponding to the arbitrary region, the first reference region and the second reference region, so as to obtain the fused target space-time data, fused first reference spatio-temporal data and second reference spatio-temporal data;
    将所述融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据,分别输入所述待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。Input the fused target spatio-temporal data, fused first reference spatio-temporal data and second reference spatio-temporal data into the spatio-temporal data processing model to be trained respectively to obtain the first data representation and the second data representation and the third data representation.
  8. 一种时空数据处理模型的训练装置,其特征在于,包括:A training device for a spatio-temporal data processing model, characterized in that it comprises:
    抽取模块,用于从训练数据集中抽取任一区域关联的目标时空数据,其中,所述训练数据集中包括各个区域关联的时空数据及各个区域的属性信息;An extraction module, configured to extract target spatio-temporal data associated with any region from the training data set, wherein the training data set includes spatio-temporal data associated with each region and attribute information of each region;
    第一获取模块,用于从所述训练数据集中获取与所述任一区域的属性信息相同的第一参考区域关联的第一参考时空数据、及与所述任一区域的属性信息不同的第二参考区域关联的第二参考时空数据;The first acquisition module is configured to acquire, from the training data set, first reference space-time data associated with a first reference area that is the same as the attribute information of any area, and a first reference space-time data that is different from the attribute information of any area. Second reference spatio-temporal data associated with the second reference area;
    第二获取模块,用于将所述目标时空数据、所述第一参考时空数据及所述第二参考时空数据,分别输入待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征;The second acquisition module is configured to respectively input the target spatio-temporal data, the first reference spatio-temporal data and the second reference spatio-temporal data into the spatio-temporal data processing model to be trained, so as to respectively acquire the first data representation, the second reference spatio-temporal data Two data representations and a third data representation;
    判断模块,用于在所述第一数据表征与所述第二数据表征间的第一差异度小于第一阈 值、且所述第一数据表征与所述第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。A judging module, configured to have a first degree of difference between the first data representation and the second data representation less than a first threshold, and a second degree of difference between the first data representation and the third data representation If it is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
  9. 如权利要求8所述的装置,其特征在于,所述区域的属性信息包括所述区域的面积、人口及所属的类型,所述第一获取模块,具体用于:The device according to claim 8, wherein the attribute information of the region includes the area, population and type of the region, and the first acquisition module is specifically used for:
    从所述训练数据集中获取与所述任一区域的属性信息中至少一个属性信息相同的第一参考区域关联的第一参考时空数据;Obtaining first reference spatio-temporal data associated with a first reference region that is identical to at least one attribute information in the attribute information of any region from the training data set;
    从所述训练数据集中获取与所述任一区域的属性信息中各个属性信息均不相同的第二参考区域关联的第二参考时空数据。The second reference spatio-temporal data associated with the second reference region whose attribute information is different in the attribute information of any region is obtained from the training data set.
  10. 如权利要求8所述的装置,其特征在于,所述区域的属性信息包括所述区域的面积、人口及所属的类型,所述第一获取模块,具体用于:The device according to claim 8, wherein the attribute information of the region includes the area, population and type of the region, and the first acquisition module is specifically used for:
    从所述训练数据集中获取与所述任一区域的各个属性信息均相同的第一参考区域关联的第一参考时空数据;Acquiring first reference spatio-temporal data associated with a first reference region having the same attribute information of any region from the training data set;
    从所述训练数据集中获取与所述任一区域的各个属性信息中至少一个属性信息不同的第二参考区域关联的第二参考时空数据。Second reference spatio-temporal data associated with a second reference region that is different from at least one attribute information of each attribute information of any region is acquired from the training data set.
  11. 如权利要求10所述的装置,其特征在于,还包括:The device of claim 10, further comprising:
    第一确定模块,用于根据所述任一区域的属性信息与所述第一参考区域的属性信息的第一匹配度,确定所述第一阈值;A first determining module, configured to determine the first threshold according to a first degree of matching between the attribute information of any region and the attribute information of the first reference region;
    第二确定模块,用于根据所述任一区域的属性信息与所述第二参考区域的属性信息的第二匹配度,确定所述第二阈值。The second determining module is configured to determine the second threshold according to a second degree of matching between the attribute information of any region and the attribute information of the second reference region.
  12. 如权利要求8至11任一项所述的装置,其特征在于,所述判断模块,还用于:The device according to any one of claims 8 to 11, wherein the judging module is also used for:
    在所述第一数据表征与所述第二数据表征间的第一差异度大于或等于第一阈值,或者,所述第一数据表征与所述第三数据表征间的第二差异度小于或等于第二阈值的情况下,返回执行所述从所述训练数据集中抽取目标时空数据的操作,直至由待训练的时空数据处理模型新生成的第一数据表征与新生成的第二数据表征间的第一差异度小于第一阈值、且所述第一数据表征与新生成的第三数据表征间的第二差异度大于第二阈值的情况下,结束所述时空数据处理模型的训练过程。The first degree of difference between the first data representation and the second data representation is greater than or equal to a first threshold, or the second degree of difference between the first data representation and the third data representation is less than or If it is equal to the second threshold, return to the operation of extracting the target spatio-temporal data from the training data set until the gap between the first data representation newly generated by the spatio-temporal data processing model to be trained and the newly generated second data representation When the first degree of difference between the first data representation and the newly generated third data representation is greater than the second threshold, the training process of the spatio-temporal data processing model ends.
  13. 如权利要求8至12任一所述的装置,其特征在于,所述训练数据集中还包括每个所述区域对应的标注标签,所述装置还包括:The device according to any one of claims 8 to 12, wherein the training data set also includes labels corresponding to each of the regions, and the device also includes:
    第三获取模块,用于将每个所述区域关联的时空数据输入训练生成的时空数据处理模型中,以获取每个所述区域对应的数据表征;The third acquisition module is used to input the spatio-temporal data associated with each of the regions into the spatio-temporal data processing model generated by training, so as to obtain the data representation corresponding to each of the regions;
    第四获取模块,用于将每个所述区域对应的数据表征输入待训练的预测模型,以获取每个所述区域对应的预测标签;The fourth acquisition module is used to input the data representation corresponding to each of the regions into the prediction model to be trained, so as to obtain the prediction labels corresponding to each of the regions;
    修正模块,用于根据所述预测标签与所述标注标签的差异,对所述预测模型及所述训练生成的时空数据处理模型分别进行修正。The correction module is configured to correct the prediction model and the spatio-temporal data processing model generated by the training according to the difference between the prediction label and the label label.
  14. 如权利要求13所述的装置,其特征在于,每个所述区域关联的时空数据,包括 每个区域对应的通信数据序列、属性图谱、人口属性及定位数据序列,所述第二获取模块,还用于:The device according to claim 13, wherein the spatio-temporal data associated with each of the regions includes communication data sequences, attribute maps, population attributes and positioning data sequences corresponding to each region, and the second acquisition module, Also used for:
    利用待训练的知识融合网络,将所述任一区域、第一参考区域及第二参考区域分别对应的通信数据序列、属性图谱、人口属性及定位数据序列进行融合,以获取融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据;Using the knowledge fusion network to be trained, fuse the communication data sequence, attribute map, population attribute and positioning data sequence respectively corresponding to the arbitrary region, the first reference region and the second reference region, so as to obtain the fused target space-time data, fused first reference spatio-temporal data and second reference spatio-temporal data;
    将所述融合后的目标时空数据、融合后的第一参考时空数据及第二参考时空数据,分别输入所述待训练的时空数据处理模型中,以分别获取第一数据表征、第二数据表征及第三数据表征。Input the fused target spatio-temporal data, fused first reference spatio-temporal data and second reference spatio-temporal data into the spatio-temporal data processing model to be trained respectively to obtain the first data representation and the second data representation and the third data representation.
  15. 一种电子设备,包括:An electronic device comprising:
    至少一个处理器;以及at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-7中任一项所述的方法。The memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can perform any one of claims 1-7. Methods.
  16. 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1-7中任一项所述的方法。A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
  17. 一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-7中任一项所述的方法。A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
  18. 一种计算机程序,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,以使得计算机执行根据权利要求1-7中任一项所述的方法。A computer program, the computer program comprising computer program code, when the computer program code is run on a computer, so that the computer executes the method according to any one of claims 1-7.
PCT/CN2022/086925 2021-06-02 2022-04-14 Method and apparatus for training spatio-temporal data processing model, and device and storage medium WO2022252843A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110612995.7 2021-06-02
CN202110612995.7A CN113723607A (en) 2021-06-02 2021-06-02 Training method, device and equipment of space-time data processing model and storage medium

Publications (1)

Publication Number Publication Date
WO2022252843A1 true WO2022252843A1 (en) 2022-12-08

Family

ID=78672815

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/086925 WO2022252843A1 (en) 2021-06-02 2022-04-14 Method and apparatus for training spatio-temporal data processing model, and device and storage medium

Country Status (2)

Country Link
CN (1) CN113723607A (en)
WO (1) WO2022252843A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113723607A (en) * 2021-06-02 2021-11-30 京东城市(北京)数字科技有限公司 Training method, device and equipment of space-time data processing model and storage medium
CN116934557B (en) * 2023-09-15 2023-12-01 中关村科学城城市大脑股份有限公司 Behavior prediction information generation method, device, electronic equipment and readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200184252A1 (en) * 2018-12-10 2020-06-11 International Business Machines Corporation Deep Learning Network for Salient Region Identification in Images
CN112016682A (en) * 2020-08-04 2020-12-01 杰创智能科技股份有限公司 Video representation learning and pre-training method and device, electronic equipment and storage medium
US20210103815A1 (en) * 2019-10-07 2021-04-08 Deepmind Technologies Limited Domain adaptation for robotic control using self-supervised learning
CN112800053A (en) * 2021-01-05 2021-05-14 深圳索信达数据技术有限公司 Data model generation method, data model calling device, data model equipment and storage medium
CN113723607A (en) * 2021-06-02 2021-11-30 京东城市(北京)数字科技有限公司 Training method, device and equipment of space-time data processing model and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782709B (en) * 2020-06-30 2024-07-02 北京百度网讯科技有限公司 Abnormal data determination method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200184252A1 (en) * 2018-12-10 2020-06-11 International Business Machines Corporation Deep Learning Network for Salient Region Identification in Images
US20210103815A1 (en) * 2019-10-07 2021-04-08 Deepmind Technologies Limited Domain adaptation for robotic control using self-supervised learning
CN112016682A (en) * 2020-08-04 2020-12-01 杰创智能科技股份有限公司 Video representation learning and pre-training method and device, electronic equipment and storage medium
CN112800053A (en) * 2021-01-05 2021-05-14 深圳索信达数据技术有限公司 Data model generation method, data model calling device, data model equipment and storage medium
CN113723607A (en) * 2021-06-02 2021-11-30 京东城市(北京)数字科技有限公司 Training method, device and equipment of space-time data processing model and storage medium

Also Published As

Publication number Publication date
CN113723607A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
JP7331171B2 (en) Methods and apparatus for training image recognition models, methods and apparatus for recognizing images, electronic devices, storage media, and computer programs
WO2023015941A1 (en) Text detection model training method and apparatus, text detection method, and device
WO2022134071A1 (en) Text extraction method and apparatus, computer readable storage medium, and electronic device
WO2023020045A1 (en) Training method for text recognition model, and text recognition method and apparatus
WO2022252843A1 (en) Method and apparatus for training spatio-temporal data processing model, and device and storage medium
CN113033622B (en) Training method, device, equipment and storage medium for cross-modal retrieval model
WO2022227769A1 (en) Training method and apparatus for lane line detection model, electronic device and storage medium
CN113222916A (en) Method, apparatus, device and medium for detecting image using target detection model
WO2023016007A1 (en) Method and apparatus for training facial recognition model, and computer program product
JP2023510665A (en) Risk prediction model establishment method, area risk prediction method, and response device
WO2023273041A1 (en) Target detection method and apparatus in vehicle-road coordination, and roadside device
CN115688920B (en) Knowledge extraction method, training device, training equipment and training medium for model
CN114820871B (en) Font generation method, model training method, device, equipment and medium
CN114065864B (en) Federal learning method, federal learning device, electronic apparatus, and storage medium
EP4123595A2 (en) Method and apparatus of rectifying text image, training method and apparatus, electronic device, and medium
CN114494784A (en) Deep learning model training method, image processing method and object recognition method
EP4120181A2 (en) Method and apparatus of fusing image, and method of training image fusion model
US20230215203A1 (en) Character recognition model training method and apparatus, character recognition method and apparatus, device and storage medium
WO2023173633A1 (en) Road condition prediction method and apparatus, and corresponding model training method and apparatus, and device and medium
US20220284807A1 (en) Method of predicting traffic volume, electronic device, and medium
CN113627536A (en) Model training method, video classification method, device, equipment and storage medium
CN115796310A (en) Information recommendation method, information recommendation device, information recommendation model training device, information recommendation equipment and storage medium
WO2023159819A1 (en) Visual processing and model training methods, device, storage medium and program product
CN113963186A (en) Training method of target detection model, target detection method and related device
CN110633716A (en) Target object detection method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22814890

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 260324)