CN113626426B - A method and system for collecting and transmitting ecological grid data - Google Patents
A method and system for collecting and transmitting ecological grid data Download PDFInfo
- Publication number
- CN113626426B CN113626426B CN202110762125.8A CN202110762125A CN113626426B CN 113626426 B CN113626426 B CN 113626426B CN 202110762125 A CN202110762125 A CN 202110762125A CN 113626426 B CN113626426 B CN 113626426B
- Authority
- CN
- China
- Prior art keywords
- data
- grid
- rset
- data request
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Mathematical Physics (AREA)
- Fuzzy Systems (AREA)
- Remote Sensing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本公开属于数据处理、数据采集传输技术领域,具体涉及一种生态网格数据的采集传输方法及系统。The present disclosure belongs to the technical field of data processing, data collection and transmission, and in particular relates to a method and system for collection and transmission of ecological grid data.
背景技术Background technique
在社会治理中,网格化治理是管理社会的事件分级分类标准的重要手段。以网格化为基础,各类社会治理环境和治理机制形成紧密的内在治理生态,这就是我们所说的治理生态网格。在当今的信息化时代,每天都会产生成千上万的社会事务办理,随着手机客户端、微信小程序和线上办理业务的技术普及,社会事务的电子化自动处理正在迅速发展,大大提高了社会服务效率,切实方便了人民群众的出行办事,而这一切都有赖于对社会治理生态网格内数据流转的智能化高效处理。生态网格的大数据系统,通过算法形成社会治理事件智能分拨数据体系模型,实现数据事件智能分拨流转,高效协同处置。随着大数据与人工智能技术的日益高速发展,统筹各区域生态网格的平衡发展,协调各网格内社会事务的电子化、智能化、高效化发展是社会事务管理的重大范畴。在防治和控制传染性疾病中,生态网格的智能化数据治理有助于高效调配社会各方面的资源调配,有利于加快高效处理广大范围的用户的大规模的事件请求,提高线上办事的处理效率与服务质量,提高社会事务的管理和服务水平。然而,目前普遍的数据传输技术较少着眼于数据传输的时间效率和总体高效协同,不足以应对社会治理生态网格内日益大规模增长的数据请求事件,急需提出新方法新技术解决这一生态网格治理需求。In social governance, grid governance is an important means of managing social event classification and classification standards. Based on the grid, various social governance environments and governance mechanisms form a close internal governance ecology, which is what we call a governance ecological grid. In today's information age, thousands of social affairs are processed every day. With the popularization of mobile client, WeChat applet and online business processing, the electronic automatic processing of social affairs is developing rapidly, greatly improving It improves the efficiency of social services and effectively facilitates the people's travel and errands, all of which depend on the intelligent and efficient processing of data flow in the social governance ecological grid. The big data system of the ecological grid forms a data system model for the intelligent distribution of social governance events through algorithms, and realizes the intelligent distribution and circulation of data events and efficient collaborative processing. With the increasingly rapid development of big data and artificial intelligence technologies, coordinating the balanced development of ecological grids in various regions and coordinating the electronic, intelligent, and efficient development of social affairs within each grid is a major category of social affairs management. In the prevention and control of infectious diseases, the intelligent data governance of the ecological grid helps to efficiently allocate resources in all aspects of society, to speed up the efficient processing of large-scale event requests from a wide range of users, and to improve the efficiency of online services. Handling efficiency and service quality, and improving the management and service level of social affairs. However, the current common data transmission technology is less focused on the time efficiency of data transmission and overall efficient coordination, which is not enough to cope with the increasingly large-scale data request events in the social governance ecological grid. It is urgent to propose new methods and technologies to solve this ecological problem. Grid governance requirements.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提出一种生态网格数据的采集传输方法及系统,以解决现有技术中所存在的一个或多个技术问题,至少提供一种有益的选择或创造条件。The purpose of the present invention is to propose a method and system for collecting and transmitting ecological grid data, so as to solve one or more technical problems existing in the prior art, and at least provide a beneficial choice or create conditions.
在当今的自动化大数据社会管理中,大数据和互联网以及人工智能技术的普及应用使得线上办理各种事务成为社会的常态,每一天随着居民的生产生活需要不断产生大量的数据,不同区域的人口密度各不相同,相对应产生的数据业务的处理的时间要求亦各不相同,对大规模的数据量的高效快速处理成为服务数据管理系统的重大课题,需要依据生态网格的数据治理提出能有效分拨流转和高效协同处置的数据传输方法及系统。In today's automated big data social management, the popularization and application of big data, the Internet and artificial intelligence technology has made online handling of various affairs the normal state of the society. The population densities are different, and the time requirements for the processing of the corresponding data services are also different. The efficient and fast processing of large-scale data volume has become a major issue for the service data management system, which requires data governance based on ecological grids. This paper proposes a data transmission method and system that can effectively allocate and transfer and efficiently coordinate processing.
本公开提供了一种生态网格数据的采集传输方法及系统,依据各网格分区的人口密度通过计算各生态网格各网格分区的数据请求的时间权重和数据量权重,由此获得各数据请求的优先权值,按优先权值的排序结果的先后顺序,按顺序进行向云服务器发送数据请求的任务,实现数据请求事件的智能分拨流转和高效协同处置,达到对数据请求的处理效率的提高以及对数据请求的处理时间的有效分配。The present disclosure provides a method and system for collecting and transmitting ecological grid data. According to the population density of each grid partition, the time weight and data volume weight of data requests of each grid partition of each ecological grid are calculated, thereby obtaining each grid partition. The priority value of the data request, according to the order of the sorting result of the priority value, the task of sending data requests to the cloud server is performed in sequence, so as to realize the intelligent distribution and efficient co-processing of data request events, and achieve the processing of data requests. Increased efficiency and efficient allocation of processing time for data requests.
为了实现上述目的,根据本公开的一方面,提供一种生态网格数据的采集传输方法,所述方法包括以下步骤:In order to achieve the above object, according to an aspect of the present disclosure, a method for collecting and transmitting ecological grid data is provided, and the method includes the following steps:
S100,将电子地图及其对应的人口热力图按照人口密度划分得到网格分区(也简称为分区),所有网格分区作为一个生态网格;S100, dividing the electronic map and its corresponding population heat map according to the population density to obtain grid partitions (also referred to as partitions), and all the grid partitions are regarded as an ecological grid;
S200,在生态网格的每个网格分区采集数据请求,所述数据请求为一个用户在客户端输入并传输到分布式数据库进行存储的一份由日期、字节数量和字符数据组成的结构化数据;S200, collect a data request in each grid partition of the ecological grid, where the data request is a structure composed of date, number of bytes and character data input by a user at the client and transmitted to a distributed database for storage data;
S300,通过计算所有数据请求中的日期得到时间权重;S300, obtain the time weight by calculating the dates in all data requests;
S400,分别计算各个网格分区内的数据请求的整体数量以及各数据请求的字节数量和字符数据,以此得到数据量权重;S400, respectively calculating the overall number of data requests in each grid partition and the number of bytes and character data of each data request, thereby obtaining a data volume weight;
S500,根据时间权重和数据量权重,计算得到各数据请求的优先权值;S500, calculating a priority value of each data request according to the time weight and the data volume weight;
S600,通过计算各数据请求的优先权值,按照数据请求的优先权值的排序作为时间的先后顺序,按先后顺序将对应的数据请求发送到云服务器。S600, by calculating the priority value of each data request, and according to the order of the priority value of the data request as the time sequence, send the corresponding data request to the cloud server in sequence.
进一步地,在S100中,将电子地图及其对应的人口热力图按照人口密度划分得到网格分区,所有网格分区作为一个生态网格,方法为:根据电子地图上的经纬度坐标、及经纬度坐标对应的人口热力图上的人口密度值,所述电子地图及其对应的人口热力图在实际的地理经纬度坐标上相互对应,所述人口热力图的帧的矩阵包含了其相应经纬度的人口密度值,使用边缘线检测算法(参考论文为[1]P Dollár,Zitnick C L.Fast Edge DetectionUsing Structured Forests[J].IEEE Transactions on Pattern Analysis and MachineIntelligence,2014,37(8):1558-1570.或者为[2]Xie S,Tu Z.Holistically-NestedEdge Detection.IEEE,2015.)对人口热力图进行边缘检测得到人口热力图上的边缘线,利用边缘线将人口热力图分割成多个部分,每个部分对应的电子地图上的实际的区域作为一个网格分区记作Dis,通过计算该网格分区Dis对应电子地图上包括的所有经纬度坐标在人口热力图上的人口密度值的算术平均值得出该网格分区的平均人口密度ρ,所有的网格分区组成的集合为一个生态网格记作Grid。Further, in S100, the electronic map and its corresponding population heat map are divided into grid partitions according to the population density, and all grid partitions are regarded as an ecological grid, and the method is: according to the longitude and latitude coordinates and the longitude and latitude coordinates on the electronic map. The population density value on the corresponding population heat map, the electronic map and its corresponding population heat map correspond to each other on the actual geographic latitude and longitude coordinates, and the matrix of the frame of the population heat map contains the population density value of its corresponding latitude and longitude , using the edge line detection algorithm (the reference paper is [1]P Dollár, Zitnick C L.Fast Edge DetectionUsing Structured Forests[J].IEEE Transactions on Pattern Analysis and MachineIntelligence,2014,37(8):1558-1570. Or for [2] Xie S, Tu Z. Holistically-NestedEdge Detection. IEEE, 2015.) Perform edge detection on the population heat map to obtain edge lines on the population heat map, and use the edge lines to divide the population heat map into multiple parts, each The actual area on the corresponding electronic map is denoted as a grid partition as Dis. By calculating the arithmetic mean of the population density values on the population heat map of all the latitude and longitude coordinates included in the electronic map corresponding to the grid partition Dis, this is obtained. The average population density ρ of grid partitions, and the set of all grid partitions is an ecological grid denoted as Grid.
进一步地,在S200中,在生态网格的每个网格分区采集数据请求,所述数据请求为一个用户在客户端输入并传输到分布式数据库进行存储的一份由日期、字节数量和字符数据组成的结构化数据,方法为:在生态网格的每个网格分区中,将位于其中的用户在客户端的一次数据输入进行数据封装成为一份结构化数据,所述结构化数据中包括该数据采集的日期、该数据的字节数量、以及该数据的字符数据,将结构化数据传输到分布式数据库进行存储作为一次数据请求记作R,所述数据请求由于采集的网格分区不同而在分布式数据库中带有不同的标识,所述字节数量为该结构化数据的字节的数量,所述字符数据为用户在客户端输入的字符串。Further, in S200, a data request is collected in each grid partition of the ecological grid, and the data request is a user input on the client side and transmitted to the distributed database for storage by date, number of bytes and Structured data composed of character data, the method is as follows: in each grid partition of the ecological grid, encapsulate a piece of data input by the user located in it into a structured data, and the structured data contains Including the date of the data collection, the number of bytes of the data, and the character data of the data, the structured data is transmitted to the distributed database for storage as a data request and denoted as R. The data request is due to the grid partition of the collection. Different identifiers are provided in the distributed database, the number of bytes is the number of bytes of the structured data, and the character data is a character string input by the user at the client.
进一步地,在S300中,通过计算所有数据请求中的日期得到时间权重,方法为:将各个网格分区所包含的数据请求中包括的日期记作由年、月、日、时、分、秒六位数值组成的数组T,T=[y,m,d,h,n,s],其中,y表示年的数值,m表示月的数值,d表示日的数值,h表示小时的数值,n表示分钟的数值,s表示秒的数值,将一个网格分区的所有的数据请求的序号以变量i表示,则序号为i的数据请求记作R_i,一个网格分区的所有的数据请求记作集合Rset,R_i∈Rset,令n1为集合Rset的所有的数据请求的数量,则i∈[1,n1],数据请求R_i包括的日期记作T_i,T_i=[y_i,m_i,d_i,h_i,n_i,s_i],其中y_i表示R_i采集时间的年的数值,m_i表示R_i采集时间的月的数值,d_i表示R_i采集时间的日的数值,h_i表示R_i采集时间的小时的数值,n_i表示R_i采集时间的分钟的数值,s_i表示R_i采集时间的秒的数值;记从一次数据请求中提取出该数据请求中包括的日期为函数Temp(),则有T_i=Temp(R_i),记从一个网格分区的所有的数据请求中筛选出包括的日期最早的数据请求的日期的函数为Fir(),设Rset中日期最早的数据请求的日期为T_fir,即T_fir=Fir(Rset),T_f=[y_f,m_f,d_f,h_f,n_f,s_f],其中y_f表示T_f的年的数值,m_f表示T_f的月的数值,d_f表示T_f的日的数值,h_f表示T_f的小时的数值,n_f表示T_f的分钟的数值,s_f表示T_f的秒的数值;由此分别计算一个网格分区的各数据请求的时间权重,记时间权重为Wet,则Rset中序号为i的数据请求的时间权重可记作Wet_i或Wet(Rset,R_i),Wet_i=Wet(Rset,R_i),定义trs1为第一中间变量,trs1的计算公式为:Further, in S300, the time weight is obtained by calculating the date in all data requests, and the method is: the date included in the data request included in each grid partition is recorded as the year, month, day, hour, minute, second An array T composed of six-digit values, T=[y,m,d,h,n,s], where y represents the value of the year, m represents the value of the month, d represents the value of the day, and h represents the value of the hour, n represents the value of minutes, and s represents the value of seconds. If the serial number of all data requests in a grid partition is represented by variable i, the data request with serial number i is recorded as R_i, and all data requests in one grid partition are recorded as As a set Rset, R_i∈Rset, let n1 be the number of all data requests in the set Rset, then i∈[1,n1], the date included in the data request R_i is recorded as T_i, T_i=[y_i,m_i,d_i,h_i ,n_i,s_i], where y_i represents the year value of R_i collection time, m_i represents the month value of R_i collection time, d_i represents the day value of R_i collection time, h_i represents the hour value of R_i collection time, and n_i represents R_i The value in minutes of the collection time, s_i represents the value in seconds of the R_i collection time; denote the date included in the data request extracted from a data request as the function Temp(), then T_i=Temp(R_i), denoted from a The function to filter out the date of the data request with the earliest date in all the data requests of the grid partition is Fir(). Let the date of the data request with the earliest date in Rset be T_fir, that is, T_fir=Fir(Rset), T_f= [y_f, m_f, d_f, h_f, n_f, s_f], where y_f represents the value of the year of T_f, m_f represents the value of the month of T_f, d_f represents the value of the day of T_f, h_f represents the value of the hour of T_f, and n_f represents the value of T_f The value of minutes, s_f represents the value of seconds of T_f; thus calculate the time weight of each data request of a grid partition, and record the time weight as Wet, then the time weight of the data request with serial number i in Rset can be recorded as Wet_i or Wet(Rset, R_i), Wet_i=Wet(Rset, R_i), define trs1 as the first intermediate variable, and the calculation formula of trs1 is:
trs1=y_f*y_i+m_f*m_i+d_f*d_i+h_f*h_i+n_f*n_i+s_f*s_i,定义trs2为第二中间变量,trs2的计算公式为:trs1=y_f*y_i+m_f*m_i+d_f*d_i+h_f*h_i+n_f*n_i+s_f*s_i, define trs2 as the second intermediate variable, and the calculation formula of trs2 is:
其中计算Wet(Rset,R_i)的公式为:The formula for calculating Wet(Rset, R_i) is:
所得的Wet_i表示序号为i的数据请求R_i的日期在集合Rset中的时间权重,得到该时间权重有助于衡量一次数据请求在整个网格分区的数据请求中的日期的先后比重。The obtained Wet_i represents the time weight of the date of the data request R_i with the serial number i in the set Rset, and obtaining the time weight helps to measure the proportion of the date of a data request in the data request of the entire grid partition.
进一步地,在S400中,分别计算各个网格分区内的数据请求的整体数量以及各数据请求的字节数量和字符数据,以此得到数据量权重,方法为:将各个网格分区所包含的数据请求中包括的字节数量记为By、数据请求中包括的字符串记为Str,将一个网格分区的所有的数据请求的序号以变量i表示,则序号为i的数据请求记作R_i,一个网格分区的所有的数据请求记作集合Rset,R_i∈Rset,令n1为集合Rset的所有的数据请求的数量,则i∈[1,n1],数据请求R_i包括的字节数量记为By_i或By(R_i)、包括的字符串记为Str_i或者Str(R_i),设函数len()为获取一次数据请求包括的字符串长度的函数,函数ln()为计算以自然数e为底的对数的函数,令数据量权重为Weg,则在Rset中序号为i的数据请求R_i的数据量权重记为Weg_i或Weg(Rset,R_i),Weg_i=Weg(Rset,R_i),基于R_i包括的字节数量和字符串计算数据量权重Weg_i的公式为:Further, in S400, the overall number of data requests in each grid partition and the number of bytes and character data of each data request are calculated respectively, so as to obtain the data volume weight, and the method is: The number of bytes included in the data request is denoted by By, and the character string included in the data request is denoted as Str. The sequence number of all data requests in a grid partition is represented by variable i, and the data request with sequence number i is denoted as R_i , all data requests of a grid partition are denoted as set Rset, R_i∈Rset, let n1 be the number of all data requests in set Rset, then i∈[1,n1], the number of bytes included in data request R_i is denoted It is By_i or By(R_i), and the included string is recorded as Str_i or Str(R_i). Let the function len() be the function to obtain the length of the string included in a data request, and the function ln() to calculate the natural number e as the base The logarithmic function of , let the data volume weight be Weg, then the data volume weight of the data request R_i with serial number i in Rset is recorded as Weg_i or Weg(Rset, R_i), Weg_i=Weg(Rset, R_i), based on R_i The formula for calculating the data volume weight Weg_i by including the number of bytes and strings is:
所求得的数据量权重Weg_i有助于衡量各数据请求在总体中的大小。The obtained data volume weight Weg_i helps to measure the size of each data request in the population.
进一步地,在S500中,根据时间权重和数据量权重,计算得到各数据请求的优先权值,方法为:将一个网格分区的所有的数据请求的序号以变量i表示,则序号为i的数据请求记作R_i,一个网格分区的所有的数据请求记作集合Rset,R_i∈Rset,令n1为集合Rset的所有的数据请求的数量,则i∈[1,n1],对网格分区中的每一次数据请求,取数据请求中包括的日期的表示日的数值记为d,令Rset中序号为i的数据请求R_i包括的的日期的表示日的数值记为d_i或者d(R_i),d_i=d(R_i),设M表示数据请求的包括的日期所在的月份的月内总共的天数,令M_i表示数据请求R_i的日期所在的月份的该月内总共的天数,依照S300中所述方法和S400中所述方法,计算一次数据请求R_i在其所在的网格分区的集合Rset中的时间权重Wet_i以及数据量权重Weg_i,根据时间权重以及数据量权重求出数据请求的优先权值Pr,数据请求R_i在其所在的网格分区的集合Rset中的优先权值记为Pr_i或者Pr(Rset,R_i),Pr_i=Pr(Rset,R_i),则优先权值Pr_i的计算公式为:Further, in S500, according to the time weight and the data volume weight, the priority value of each data request is calculated and obtained, and the method is: the sequence number of all data requests of a grid partition is represented by variable i, then the sequence number is i. The data request is denoted as R_i, and all the data requests of a grid partition are denoted as the set Rset, R_i∈Rset, let n1 be the number of all data requests in the set Rset, then i∈[1,n1], for the grid partition For each data request in the data request, take the value of the date included in the data request and denote the value of the day as d, and let the value of the date included in the data request R_i with the serial number i in Rset be denoted as d_i or d(R_i) , d_i=d(R_i), let M represent the total number of days in the month of the month where the date of the data request is located, and let M_i represent the total number of days in the month of the month where the date of the data request R_i is located, according to S300 The method described in the method and the method described in S400, calculate the time weight Wet_i and the data volume weight Weg_i of the data request R_i in the set Rset of the grid partition where it is located, and obtain the priority value of the data request according to the time weight and the data volume weight Pr, the priority value of the data request R_i in the set Rset of the grid partition where it is located is recorded as Pr_i or Pr(Rset, R_i), Pr_i=Pr(Rset, R_i), then the calculation formula of the priority value Pr_i is:
集合Rset中的所有的数据请求的优先权值可表示为集合Pset,The priority values of all data requests in the set Rset can be expressed as the set Pset,
Pset={Pr(Rset,R_i),R_i∈Rset}Pset={Pr(Rset,R_i),R_i∈Rset}
Rset中总共有n1次数据请求R_i,对应地,集合Pset中有n1个优先权值,该计算优先权值的方法有助于衡量不同的数据请求在一个网格分区中的先后顺序的优先等级。There are a total of n1 data requests R_i in Rset. Correspondingly, there are n1 priority values in the set Pset. This method of calculating priority values helps to measure the priority of different data requests in a grid partition. .
进一步地,在S600中,通过计算各数据请求的优先权值,按照数据请求的优先权值的排序作为时间的先后顺序,按先后顺序将对应的数据请求发送到云服务器,方法为:令所有的网格分区组成的集合为一个生态网格Grid,一个生态网格Grid中包含的所有的网格分区的数量为k,变量j表示生态网格Grid中的网格分区的序号,j∈[1,k],将生态网格Grid中序号为j的网格分区记为Dis_j,网格分区Dis_j的平均人口密度记为ρ_j,根据S500中所述方法,网格分区Dis_j中所有的数据请求的集合记为Rset_j,Rset_j中的序号为i的数据请求记为R_i_j,Rset_j中的序号为i的数据请求R_i_j中包括的日期记为T_i_j或Temp(R_i_j),R_i_j中包括的字节数量记为By_i_j、数据请求中包括的字符串记为Str_i_j,Rset_j中日期最早的数据请求的日期为T_fir_j或者Fir(Rset_j),将Rset_j中序号为i的数据请求的时间权重可记作Wet_i_j或Wet(Rset_j,R_i_j)、Rset_j中序号为i的数据请求的数据量权重记作Weg_i_j或Weg(Rset_j,R_i_j),函数Max_sort()为按数值从大到小排序的函数,执行如下步骤:Further, in S600, by calculating the priority value of each data request, according to the order of the priority value of the data request as the time sequence, the corresponding data request is sent to the cloud server in sequence, and the method is: The set of grid partitions is an ecological grid Grid, the number of all grid partitions contained in an ecological grid Grid is k, and the variable j represents the serial number of the grid partitions in the ecological grid Grid, j∈[ 1,k], the grid partition with the serial number j in the ecological grid Grid is recorded as Dis_j, the average population density of the grid partition Dis_j is recorded as ρ_j, according to the method described in S500, all data requests in the grid partition Dis_j The set of data is recorded as Rset_j, the data request with the serial number i in Rset_j is recorded as R_i_j, the data request with the serial number i in Rset_j The date included in R_i_j is recorded as T_i_j or Temp(R_i_j), and the number of bytes included in R_i_j is recorded as For By_i_j, the string included in the data request is recorded as Str_i_j, the date of the earliest data request in Rset_j is T_fir_j or Fir(Rset_j), the time weight of the data request with the serial number i in Rset_j can be recorded as Wet_i_j or Wet( Rset_j, R_i_j), the data volume weight of the data request with the serial number i in Rset_j is recorded as Weg_i_j or Weg(Rset_j, R_i_j).
S601,从分布式数据库中,获取集合Grid;S601, obtain a collection Grid from a distributed database;
S602,创建空数组Lset;在集合Grid中,获取其中各个网格分区Dis_j对应的平均人口密度记ρ_j并将ρ_j加入Lset中;S602, create an empty array Lset; in the set Grid, obtain the average population density record ρ_j corresponding to each grid partition Dis_j and add ρ_j to Lset;
S603,选取Lset中数值最大的元素,进而获取该元素对应的平均人口密度最大的网格分区Dis_j;S603, select the element with the largest value in Lset, and then obtain the grid partition Dis_j with the largest average population density corresponding to this element;
S604,获取网格分区Dis_j的数据请求的集合Rset_j;S604, obtain the set Rset_j of data requests of the grid partition Dis_j;
S605,通过S500所述方法,获取集合Rset_j中的所有的数据请求的优先权值可表示为集合Pset_j,得到Pset_j={Pr(Rset_j,R_i_j),R_i_j∈Rset_j};S605, by using the method described in S500, the priority values of all data requests in the set Rset_j are obtained, which can be expressed as the set Pset_j, to obtain Pset_j={Pr(Rset_j, R_i_j), R_i_j∈Rset_j};
S606,通过函数Max_sort()计算函数Max_sort(Pset_j),将Pset_j中的元素按数值从大到小排序得到排序结果的序列为Seq,按照排序的结果Seq中各元素对应的从大到小的先后顺序,作为Rset_j中各数据请求R_i_j向云处理器进行发送的先后顺序,按照此先后顺序将Rset_j中的各数据请求R_i_j向云处理器进行发送。S606, the function Max_sort() is used to calculate the function Max_sort(Pset_j), and the elements in Pset_j are sorted in descending order of value to obtain a sequence of sorting results as Seq, and the corresponding elements in the sorted result Seq are in descending order The order is the order in which each data request R_i_j in Rset_j is sent to the cloud processor, and each data request R_i_j in Rset_j is sent to the cloud processor according to this order.
本公开还提供了一种生态网格数据的采集传输系统,所述一种生态网格数据的采集传输系统包括:处理器、存储器及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现权利要求1中的一种生态网格数据的采集传输方法中的步骤,所述一种生态网格数据的采集传输系统可以运行于桌上型计算机、笔记本、移动电话、手提电话、平板电脑、掌上电脑及云端数据中心等计算设备中,可运行的系统可包括,但不仅限于,处理器、存储器、服务器集群,所述处理器执行所述计算机程序运行在以下系统的单元中:The present disclosure also provides a collection and transmission system for ecological grid data, the system for collection and transmission of ecological grid data includes: a processor, a memory, and a system stored in the memory and operable on the processor The computer program, the processor implements the steps in the method for collecting and transmitting ecological grid data in
数据网格分区单元,用于将电子地图及其对应的人口热力图按照人口密度划分得到网格分区进而组成生态网格;The data grid partition unit is used to divide the electronic map and its corresponding population heat map according to the population density to obtain grid partitions to form an ecological grid;
数据请求采集单元,用于在生态网格的每个网格分区中采集数据请求;A data request collection unit for collecting data requests in each grid partition of the ecological grid;
权重计算单元,用于通过计算所有数据请求中的日期得到时间权重并分别计算各个网格分区内的数据请求的整体数量以及各数据请求的字节数量和字符数据得到数据量权重;The weight calculation unit is used to obtain the time weight by calculating the date in all data requests, and separately calculate the overall number of data requests in each grid partition and the number of bytes and character data of each data request to obtain the data volume weight;
优先权值计算单元,用于根据时间权重和数据量权重计算得到各数据请求的优先权值;a priority value calculation unit, used for calculating the priority value of each data request according to the time weight and the data volume weight;
排序发送单元,用于按照数据请求的优先权值的排序作为时间的先后顺序按先后顺序将对应的数据请求发送到云服务器。The sorting and sending unit is used for sending the corresponding data requests to the cloud server in a sequential order according to the sorting of the priority values of the data requests as the time sequence.
本公开的有益效果为:本公开提供了一种生态网格数据的采集传输方法及系统,依据各网格分区的人口密度,通过计算各生态网格各网格分区的数据请求的时间权重和数据量权重,由此获得各数据请求的优先权值,按优先权值的排序结果的先后顺序,按顺序进行向云服务器发送数据请求的任务,实现数据请求事件的智能分拨流转和高效协同处置,达到对数据请求的处理效率的提高以及对数据请求的处理时间的有效分配。The beneficial effects of the present disclosure are as follows: the present disclosure provides a method and system for collecting and transmitting ecological grid data. According to the population density of each grid partition, the time weight and the time weight of the data request of each grid partition of each ecological grid are calculated. The weight of the data volume is used to obtain the priority value of each data request, and the task of sending data requests to the cloud server is performed in order according to the order of the priority value sorting results, so as to realize the intelligent distribution and efficient coordination of data request events. Processing, to achieve the improvement of the processing efficiency of the data request and the effective allocation of the processing time of the data request.
附图说明Description of drawings
通过对结合附图所示出的实施方式进行详细说明,本公开的上述以及其他特征将更加明显,本公开附图中相同的参考标号表示相同或相似的元素,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,在附图中:The above-mentioned and other features of the present disclosure will become more apparent from the detailed description of the embodiments shown in conjunction with the accompanying drawings, in which the same reference numerals refer to the same or similar elements of the present disclosure. The drawings are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative efforts. In the drawings:
图1所示为一种生态网格数据的采集传输方法的流程图;Figure 1 is a flowchart of a method for collecting and transmitting ecological grid data;
图2所示为一种生态网格数据的采集传输系统的系统结构图。Figure 2 shows a system structure diagram of an ecological grid data collection and transmission system.
具体实施方式Detailed ways
以下将结合实施例和附图对本公开的构思、具体结构及产生的技术效果进行清楚、完整的描述,以充分地理解本公开的目的、方案和效果。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The concept, specific structure and technical effects of the present disclosure will be clearly and completely described below with reference to the embodiments and accompanying drawings, so as to fully understand the purpose, solutions and effects of the present disclosure. It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict.
在本发明的描述中,若干的含义是一个或者多个,多个的含义是两个以上,大于、小于、超过等理解为不包括本数,以上、以下、以内等理解为包括本数。如果有描述到第一、第二只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。In the description of the present invention, the meaning of several is one or more, the meaning of multiple is two or more, greater than, less than, exceeding, etc. are understood as not including this number, above, below, within, etc. are understood as including this number. If it is described that the first and the second are only for the purpose of distinguishing technical features, it cannot be understood as indicating or implying relative importance, or indicating the number of the indicated technical features or the order of the indicated technical features. relation.
如图1所示为根据本发明的一种生态网格数据的采集传输方法的流程图,下面结合图1来阐述根据本发明的实施方式的一种生态网格数据的采集传输方法及系统。FIG. 1 is a flowchart of a method for collecting and transmitting ecological grid data according to the present invention. The following describes a method and system for collecting and transmitting ecological grid data according to an embodiment of the present invention with reference to FIG. 1 .
本公开提出一种生态网格数据的采集传输方法,所述方法具体包括以下步骤:The present disclosure proposes a method for collecting and transmitting ecological grid data, and the method specifically includes the following steps:
S100,将电子地图及其对应的人口热力图按照人口密度划分得到网格分区,所有网格分区作为一个生态网格;S100, divide the electronic map and its corresponding population heat map according to the population density to obtain grid partitions, and all grid partitions are regarded as an ecological grid;
S200,在生态网格的每个网格分区采集数据请求,所述数据请求为一个用户在客户端输入并传输到分布式数据库进行存储的一份由日期、字节数量和字符数据组成的结构化数据;S200, collect a data request in each grid partition of the ecological grid, where the data request is a structure composed of date, number of bytes and character data input by a user at the client and transmitted to a distributed database for storage data;
S300,通过计算所有数据请求中的日期得到时间权重;S300, obtain the time weight by calculating the dates in all data requests;
S400,分别计算各个网格分区内的数据请求的整体数量以及各数据请求的字节数量和字符数据,以此得到数据量权重;S400, respectively calculating the overall number of data requests in each grid partition and the number of bytes and character data of each data request, thereby obtaining a data volume weight;
S500,根据时间权重和数据量权重,计算得到各数据请求的优先权值;S500, calculating a priority value of each data request according to the time weight and the data volume weight;
S600,通过计算各数据请求的优先权值,按照数据请求的优先权值的排序作为时间的先后顺序,按先后顺序将对应的数据请求发送到云服务器。S600, by calculating the priority value of each data request, and according to the order of the priority value of the data request as the time sequence, send the corresponding data request to the cloud server in sequence.
进一步地,在S100中,将电子地图及其对应的人口热力图按照人口密度划分得到网格分区,所有网格分区作为一个生态网格,方法为:根据电子地图上的经纬度坐标、及经纬度坐标对应的人口热力图上的人口密度值,所述电子地图及其对应的人口热力图在实际的地理经纬度坐标上相互对应,所述人口热力图的帧的矩阵包含了其相应经纬度的人口密度值,使用边缘线检测算法算法(参考论文为[1]P Dollár,Zitnick C L.Fast EdgeDetection Using Structured Forests[J].IEEE Transactions on Pattern Analysisand Machine Intelligence,2014,37(8):1558-1570.或者为[2]Xie S,TuZ.Holistically-Nested Edge Detection.IEEE,2015.)对人口热力图进行边缘检测得到人口热力图上的边缘线,利用边缘线将人口热力图分割成多个部分,每个部分对应的电子地图上的实际的区域作为一个网格分区记作Dis,通过计算该网格分区Dis对应电子地图上包括的所有经纬度坐标在人口热力图上的人口密度值的算术平均值得出该网格分区的平均人口密度ρ,所有的网格分区组成的集合为一个生态网格记作Grid。Further, in S100, the electronic map and its corresponding population heat map are divided into grid partitions according to the population density, and all grid partitions are regarded as an ecological grid, and the method is: according to the longitude and latitude coordinates and the longitude and latitude coordinates on the electronic map. The population density value on the corresponding population heat map, the electronic map and its corresponding population heat map correspond to each other on the actual geographic latitude and longitude coordinates, and the matrix of the frame of the population heat map contains the population density value of its corresponding latitude and longitude , using the edge line detection algorithm (the reference paper is [1]P Dollár, Zitnick C L.Fast EdgeDetection Using Structured Forests[J].IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014,37(8):1558-1570. Or For [2] Xie S, TuZ. Holistically-Nested Edge Detection. IEEE, 2015.), perform edge detection on the population heat map to obtain the edge line on the population heat map, and use the edge line to divide the population heat map into multiple parts. The actual area on the electronic map corresponding to each part is denoted as a grid partition as Dis, and it is obtained by calculating the arithmetic mean of the population density values on the population heat map of all the latitude and longitude coordinates included in the electronic map corresponding to the grid partition Dis. The average population density ρ of the grid partition, and the set of all grid partitions is an ecological grid, denoted as Grid.
进一步地,在S200中,在生态网格的每个网格分区采集数据请求,所述数据请求为一个用户在客户端输入并传输到分布式数据库进行存储的一份由日期、字节数量和字符数据组成的结构化数据,方法为:在生态网格的每个网格分区中,将位于其中的用户在客户端的一次数据输入进行数据封装成为一份结构化数据,所述结构化数据中包括该数据采集的日期、该数据的字节数量、以及该数据的字符数据,将结构化数据传输到分布式数据库进行存储作为一次数据请求记作R,所述数据请求由于采集的网格分区不同而在分布式数据库中带有不同的标识,所述字节数量为该结构化数据的字节的数量,所述字符数据为用户在客户端输入的字符串。Further, in S200, a data request is collected in each grid partition of the ecological grid, and the data request is a user input on the client side and transmitted to the distributed database for storage by date, number of bytes and Structured data composed of character data, the method is as follows: in each grid partition of the ecological grid, encapsulate a piece of data input by the user located in it into a structured data, and the structured data contains Including the date of the data collection, the number of bytes of the data, and the character data of the data, the structured data is transmitted to the distributed database for storage as a data request and denoted as R. The data request is due to the grid partition of the collection. Different identifiers are provided in the distributed database, the number of bytes is the number of bytes of the structured data, and the character data is a character string input by the user at the client.
进一步地,在S300中,通过计算所有数据请求中的日期得到时间权重,方法为:将各个网格分区所包含的数据请求中包括的日期记作由年、月、日、时、分、秒六位数值组成的数组T,T=[y,m,d,h,n,s],其中,y表示年的数值,m表示月的数值,d表示日的数值,h表示小时的数值,n表示分钟的数值,s表示秒的数值,将一个网格分区的所有的数据请求的序号以变量i表示,则序号为i的数据请求记作R_i,一个网格分区的所有的数据请求记作集合Rset,R_i∈Rset,令n1为集合Rset的所有的数据请求的数量,则i∈[1,n1],数据请求R_i包括的日期记作T_i,T_i=[y_i,m_i,d_i,h_i,n_i,s_i],其中y_i表示R_i采集时间的年的数值,m_i表示R_i采集时间的月的数值,d_i表示R_i采集时间的日的数值,h_i表示R_i采集时间的小时的数值,n_i表示R_i采集时间的分钟的数值,s_i表示R_i采集时间的秒的数值;,记从一次数据请求中提取出该数据请求中包括的日期为函数Temp(),则有T_i=Temp(R_i),记从一个网格分区的所有的数据请求中筛选出包括的日期最早的数据请求的日期的函数为Fir(),设Rset中日期最早的数据请求的日期为T_fir,即T_fir=Fir(Rset),T_f=[y_f,m_f,d_f,h_f,n_f,s_f],其中y_f表示T_f的年的数值,m_f表示T_f的月的数值,d_f表示T_f的日的数值,h_f表示T_f的小时的数值,n_f表示T_f的分钟的数值,s_f表示T_f的秒的数值;由此分别计算一个网格分区的各数据请求的时间权重,记时间权重为Wet,则Rset中序号为i的数据请求的时间权重可记作Wet_i或Wet(Rset,R_i),Wet_i=Wet(Rset,R_i),定义trs1为第一中间变量,trs1的计算公式为:Further, in S300, the time weight is obtained by calculating the date in all data requests, and the method is: the date included in the data request included in each grid partition is recorded as the year, month, day, hour, minute, second An array T composed of six-digit values, T=[y,m,d,h,n,s], where y represents the value of the year, m represents the value of the month, d represents the value of the day, and h represents the value of the hour, n represents the value of minutes, and s represents the value of seconds. If the serial number of all data requests in a grid partition is represented by variable i, the data request with serial number i is recorded as R_i, and all data requests in one grid partition are recorded as As a set Rset, R_i∈Rset, let n1 be the number of all data requests in the set Rset, then i∈[1,n1], the date included in the data request R_i is recorded as T_i, T_i=[y_i,m_i,d_i,h_i ,n_i,s_i], where y_i represents the year value of R_i collection time, m_i represents the month value of R_i collection time, d_i represents the day value of R_i collection time, h_i represents the hour value of R_i collection time, and n_i represents R_i The value of the minute of the collection time, s_i represents the value of the second of the R_i collection time; and the date included in the data request is extracted from a data request as the function Temp(), then there is T_i=Temp(R_i), recorded from The function to filter out the date of the data request with the earliest date in all the data requests of a grid partition is Fir(). Let the date of the data request with the earliest date in Rset be T_fir, that is, T_fir=Fir(Rset), T_f =[y_f,m_f,d_f,h_f,n_f,s_f], where y_f represents the value of the year of T_f, m_f represents the value of the month of T_f, d_f represents the value of the day of T_f, h_f represents the value of the hour of T_f, and n_f represents the value of the day of T_f The value of minutes in T_f, and s_f represents the value of seconds in T_f; thus, the time weight of each data request of a grid partition is calculated separately, and the time weight is recorded as Wet, then the time weight of the data request with the serial number i in Rset can be recorded As Wet_i or Wet(Rset, R_i), Wet_i=Wet(Rset, R_i), define trs1 as the first intermediate variable, and the calculation formula of trs1 is:
trs1=y_f*y_i+m_f*m_i+d_f*d_i+h_f*h_i+n_f*n_i+s_f*s_i,定义trs2为第二中间变量,trs2的计算公式为:trs1=y_f*y_i+m_f*m_i+d_f*d_i+h_f*h_i+n_f*n_i+s_f*s_i, define trs2 as the second intermediate variable, and the calculation formula of trs2 is:
其中计算Wet(Rset,R_i)的公式为:The formula for calculating Wet(Rset, R_i) is:
所得的Wet_i表示序号为i的数据请求R_i的日期在集合Rset中的时间权重,得到该时间权重有助于衡量一次数据请求在整个网格分区的数据请求中的日期的先后比重。The obtained Wet_i represents the time weight of the date of the data request R_i with the serial number i in the set Rset, and obtaining the time weight helps to measure the proportion of the date of a data request in the data request of the entire grid partition.
进一步地,在S400中,分别计算各个网格分区内的数据请求的整体数量以及各数据请求的字节数量和字符数据,以此得到数据量权重,方法为:将各个网格分区所包含的数据请求中包括的字节数量记为By、数据请求中包括的字符串记为Str,将一个网格分区的所有的数据请求的序号以变量i表示,则序号为i的数据请求记作R_i,一个网格分区的所有的数据请求记作集合Rset,R_i∈Rset,令n1为集合Rset的所有的数据请求的数量,则i∈[1,n1],数据请求R_i包括的字节数量记为By_i或By(R_i)、包括的字符串记为Str_i或者Str(R_i),设函数len()为获取一次数据请求包括的字符串长度的函数,函数ln()为计算以自然数e为底的对数的函数,令数据量权重为Weg,则在Rset中序号为i的数据请求R_i的数据量权重记为Weg_i或Weg(Rset,R_i),Weg_i=Weg(Rset,R_i),基于R_i包括的字节数量和字符串计算数据量权重Weg_i的公式为:Further, in S400, the overall number of data requests in each grid partition and the number of bytes and character data of each data request are calculated respectively, so as to obtain the data volume weight, and the method is: The number of bytes included in the data request is denoted by By, and the character string included in the data request is denoted as Str. The sequence number of all data requests in a grid partition is represented by variable i, and the data request with sequence number i is denoted as R_i , all data requests of a grid partition are denoted as set Rset, R_i∈Rset, let n1 be the number of all data requests in set Rset, then i∈[1,n1], the number of bytes included in data request R_i is denoted It is By_i or By(R_i), and the included string is recorded as Str_i or Str(R_i). Let the function len() be the function to obtain the length of the string included in a data request, and the function ln() to calculate the natural number e as the base The logarithmic function of , let the data volume weight be Weg, then the data volume weight of the data request R_i with serial number i in Rset is recorded as Weg_i or Weg(Rset, R_i), Weg_i=Weg(Rset, R_i), based on R_i The formula for calculating the data volume weight Weg_i by including the number of bytes and strings is:
所求得的数据量权重Weg_i有助于衡量各数据请求在总体中的大小。The obtained data volume weight Weg_i helps to measure the size of each data request in the population.
进一步地,在S500中,根据时间权重和数据量权重,计算得到各数据请求的优先权值,方法为:将一个网格分区的所有的数据请求的序号以变量i表示,则序号为i的数据请求记作R_i,一个网格分区的所有的数据请求记作集合Rset,R_i∈Rset,令n1为集合Rset的所有的数据请求的数量,则i∈[1,n1],对网格分区中的每一次数据请求,取数据请求中包括的日期的表示日的数值记为d,令Rset中序号为i的数据请求R_i包括的的日期的表示日的数值记为d_i或者d(R_i),d_i=d(R_i),设M表示数据请求的包括的日期所在的月份的该月内总共的天数,令M_i表示数据请求R_i的日期所在的月份的该月内总共的天数,依照S300中所述方法和S400中所述方法,计算一次数据请求R_i在其所在的网格分区的集合Rset中的时间权重Wet_i以及数据量权重Weg_i,根据时间权重以及数据量权重求出数据请求的优先权值Pr,数据请求R_i在其所在的网格分区的集合Rset中的优先权值记为Pr_i或者Pr(Rset,R_i),Pr_i=Pr(Rset,R_i),则优先权值Pr_i的计算公式为:Further, in S500, according to the time weight and the data volume weight, the priority value of each data request is calculated and obtained, and the method is: the sequence number of all data requests of a grid partition is represented by variable i, then the sequence number is i. The data request is denoted as R_i, and all the data requests of a grid partition are denoted as the set Rset, R_i∈Rset, let n1 be the number of all data requests in the set Rset, then i∈[1,n1], for the grid partition For each data request in the data request, take the value of the date included in the data request and denote the value of the day as d, and let the value of the date included in the data request R_i with the serial number i in Rset be denoted as d_i or d(R_i) , d_i=d(R_i), let M represent the total number of days in the month of the month in which the date of the data request is located, let M_i represent the total number of days in the month of the month where the date of the data request R_i is located, according to S300 The method and the method described in S400, calculate the time weight Wet_i and the data volume weight Weg_i of the data request R_i in the set Rset of the grid partition where it is located, and obtain the priority of the data request according to the time weight and the data volume weight The value Pr, the priority value of the data request R_i in the set Rset of the grid partition where it is located is recorded as Pr_i or Pr(Rset, R_i), Pr_i=Pr(Rset, R_i), then the calculation formula of the priority value Pr_i is :
集合Rset中的所有的数据请求的优先权值可表示为集合Pset,The priority values of all data requests in the set Rset can be expressed as the set Pset,
Pset={Pr(Rset,R_i),R_i∈Rset}Pset={Pr(Rset,R_i),R_i∈Rset}
Rset中总共有n1次数据请求R_i,对应地,集合Pset中有n1个优先权值,该计算优先权值的方法有助于衡量不同的数据请求在一个网格分区中的先后顺序的优先等级。There are a total of n1 data requests R_i in Rset. Correspondingly, there are n1 priority values in the set Pset. This method of calculating priority values helps to measure the priority of different data requests in a grid partition. .
进一步地,在S600中,通过计算各数据请求的优先权值,按照数据请求的优先权值的排序作为时间的先后顺序,按先后顺序将对应的数据请求发送到云服务器,方法为:以S100中所述方法和S200中所述方法,令所有的网格分区组成的集合为一个生态网格Grid,一个生态网格Grid中包含的所有的网格分区的数量为k,变量j表示生态网格Grid中的网格分区的序号,j∈[1,k],将生态网格Grid中序号为j的网格分区记为Dis_j,网格分区Dis_j的平均人口密度记为ρ_j,根据S500中所述方法,网格分区Dis_j中所有的数据请求的集合记为Rset_j,Rset_j中的序号为i的数据请求记为R_i_j,Rset_j中的序号为i的数据请求R_i_j中包括的日期记为T_i_j或Temp(R_i_j),R_i_j中包括的字节数量记为By_i_j、数据请求中包括的字符串记为Str_i_j,Rset_j中日期最早的数据请求的日期为T_fir_j或者Fir(Rset_j),将Rset_j中序号为i的数据请求的时间权重可记作Wet_i_j或Wet(Rset_j,R_i_j)、Rset_j中序号为i的数据请求的数据量权重记作Weg_i_j或Weg(Rset_j,R_i_j),函数Max_sort()为按数值从大到小排序的函数,执行如下步骤:Further, in S600, by calculating the priority value of each data request, according to the order of the priority value of the data request as the order of time, the corresponding data request is sent to the cloud server in the order, the method is as follows: using S100 The method described in the method and the method described in S200, make the set of all grid partitions constitute an ecological grid Grid, the number of all grid partitions contained in an ecological grid Grid is k, and the variable j represents the ecological grid The serial number of the grid partition in the grid, j∈[1,k], the grid partition with serial number j in the ecological grid Grid is recorded as Dis_j, and the average population density of the grid partition Dis_j is recorded as ρ_j, according to the S500 In the described method, the set of all data requests in the grid partition Dis_j is denoted as Rset_j, the data request with sequence number i in Rset_j is denoted as R_i_j, and the date included in the data request R_i_j with sequence number i in Rset_j is denoted as T_i_j or Temp(R_i_j), the number of bytes included in R_i_j is recorded as By_i_j, the string included in the data request is recorded as Str_i_j, the date of the earliest data request in Rset_j is T_fir_j or Fir(Rset_j), the serial number in Rset_j is i The time weight of the data request can be recorded as Wet_i_j or Wet(Rset_j, R_i_j), the data volume weight of the data request with serial number i in Rset_j is recorded as Weg_i_j or Weg(Rset_j, R_i_j), the function Max_sort() is based on the numerical value from the largest To the small sort function, perform the following steps:
S601,从分布式数据库中,获取集合Grid;S601, obtain a collection Grid from a distributed database;
S602,创建空数组Lset;在集合Grid中,获取其中各个网格分区Dis_j对应的平均人口密度记ρ_j并将ρ_j加入Lset中;S602, create an empty array Lset; in the set Grid, obtain the average population density record ρ_j corresponding to each grid partition Dis_j and add ρ_j to Lset;
S603,选取Lset中数值最大的元素,进而获取该元素对应的平均人口密度最大的网格分区Dis_j;S603, select the element with the largest value in Lset, and then obtain the grid partition Dis_j with the largest average population density corresponding to this element;
S604,获取网格分区Dis_j的数据请求的集合Rset_j;S604, obtain the set Rset_j of data requests of the grid partition Dis_j;
S605,通过S500所述方法,获取集合Rset_j中的所有的数据请求的优先权值可表示为集合Pset_j,得到Pset_j={Pr(Rset_j,R_i_j),R_i_j∈Rset_j};S605, by using the method described in S500, the priority values of all data requests in the set Rset_j are obtained, which can be expressed as the set Pset_j, to obtain Pset_j={Pr(Rset_j, R_i_j), R_i_j∈Rset_j};
S606,通过函数Max_sort()计算函数Max_sort(Pset_j),将Pset_j中的元素按数值从大到小排序得到排序结果的序列为Seq,按照排序的结果Seq中各元素对应的从大到小的先后顺序,作为Rset_j中各数据请求R_i_j向云处理器进行发送的先后顺序,按照此先后顺序将Rset_j中的各数据请求R_i_j向云处理器进行发送。S606, the function Max_sort() is used to calculate the function Max_sort(Pset_j), and the elements in Pset_j are sorted in descending order of value to obtain a sequence of sorting results as Seq, and the corresponding elements in the sorted result Seq are in descending order The order is the order in which each data request R_i_j in Rset_j is sent to the cloud processor, and each data request R_i_j in Rset_j is sent to the cloud processor according to this order.
所述一种生态网格数据的采集传输系统包括:处理器、存储器及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述一种生态网格数据的采集传输方法实施例中的步骤,所述一种生态网格数据的采集传输系统可以运行于桌上型计算机、笔记本、掌上电脑及云端数据中心等计算设备中,可运行的系统可包括,但不仅限于,处理器、存储器、服务器集群。The system for collecting and transmitting ecological grid data includes: a processor, a memory, and a computer program stored in the memory and running on the processor, and the processor implements the above when executing the computer program. The steps in an embodiment of a method for collecting and transmitting ecological grid data, the system for collecting and transmitting ecological grid data can run in computing devices such as desktop computers, notebooks, PDAs, and cloud data centers, etc. The operating system may include, but is not limited to, a cluster of processors, memory, and servers.
本公开的实施例提供的一种生态网格数据的采集传输系统,如图2所示,该实施例的一种生态网格数据的采集传输系统包括:处理器、存储器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述一种生态网格数据的采集传输方法实施例中的步骤,所述处理器执行所述计算机程序运行在以下系统的单元中:An embodiment of the present disclosure provides a collection and transmission system for ecological grid data. As shown in FIG. 2 , the collection and transmission system for ecological grid data in this embodiment includes: a processor, a memory, and a system stored in the memory. A computer program that can be run on the processor, when the processor executes the computer program, the steps in the above-mentioned embodiment of the method for collecting and transmitting ecological grid data are implemented, and the processor executes the computer program. Programs run in units of the following systems:
数据网格分区单元,用于将电子地图及其对应的人口热力图按照人口密度划分得到网格分区进而组成生态网格;The data grid partition unit is used to divide the electronic map and its corresponding population heat map according to the population density to obtain grid partitions to form an ecological grid;
数据请求采集单元,用于在生态网格的每个网格分区中采集数据请求;A data request collection unit for collecting data requests in each grid partition of the ecological grid;
权重计算单元,用于通过计算所有数据请求中的日期得到时间权重并分别计算各个网格分区内的数据请求的整体数量以及各数据请求的字节数量和字符数据得到数据量权重;The weight calculation unit is used to obtain the time weight by calculating the date in all data requests, and separately calculate the overall number of data requests in each grid partition and the number of bytes and character data of each data request to obtain the data volume weight;
优先权值计算单元,用于根据时间权重和数据量权重计算得到各数据请求的优先权值;a priority value calculation unit, used for calculating the priority value of each data request according to the time weight and the data volume weight;
排序发送单元,用于按照数据请求的优先权值的排序作为时间的先后顺序按先后顺序将对应的数据请求发送到云服务器。The sorting and sending unit is used for sending the corresponding data requests to the cloud server in a sequential order according to the sorting of the priority values of the data requests as the time sequence.
所述一种生态网格数据的采集传输系统可以运行于桌上型计算机、笔记本、掌上电脑及云端数据中心等计算设备中。所述一种生态网格数据的采集传输系统包括,但不仅限于,处理器、存储器。本领域技术人员可以理解,所述例子仅仅是一种生态网格数据的采集传输方法及系统的示例,并不构成对一种生态网格数据的采集传输方法及系统的限定,可以包括比例子更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述一种生态网格数据的采集传输系统还可以包括输入输出设备、网络接入设备、总线等。The collection and transmission system for ecological grid data can be run in computing devices such as desktop computers, notebooks, palmtop computers, and cloud data centers. The system for collecting and transmitting ecological grid data includes, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above example is only an example of a method and system for collecting and transmitting ecological grid data, and does not constitute a limitation on a method and system for collecting and transmitting ecological grid data, which may include proportional More or less components, or a combination of some components, or different components, for example, the ecological grid data collection and transmission system may also include input and output devices, network access devices, buses, and the like.
所称处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立元器件门电路或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述一种生态网格数据的采集传输系统的控制中心,利用各种接口和线路连接整个一种生态网格数据的采集传输系统的各个网格分区域。The processor may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete component gate circuits or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is the control center of the ecological grid data collection and transmission system, and is connected by various interfaces and lines. Each grid sub-area of the entire collection and transmission system of an ecological grid data.
所述存储器可用于存储所述计算机程序和/或模块,所述处理器通过运行或执行存储在所述存储器内的计算机程序和/或模块,以及调用存储在存储器内的数据,实现所述一种生态网格数据的采集传输方法及系统的各种功能。所述存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory can be used to store the computer program and/or module, and the processor implements the one by running or executing the computer program and/or module stored in the memory and calling the data stored in the memory. A collection and transmission method of ecological grid data and various functions of the system. The memory may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store Data (such as audio data, phonebook, etc.) created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory such as hard disk, internal memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card , a flash memory card (Flash Card), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
本公开提供了一种生态网格数据的采集传输方法及系统,依据各网格分区的人口密度,通过计算各生态网格各网格分区的数据请求的时间权重和数据量权重,由此获得各数据请求的优先权值,按优先权值的排序结果的先后顺序,按顺序进行向云服务器发送数据请求的任务,实现数据请求事件的智能分拨流转和高效协同处置,达到对数据请求的处理效率的提高以及对数据请求的处理时间的有效分配。The present disclosure provides a method and system for collecting and transmitting ecological grid data. According to the population density of each grid partition, by calculating the time weight and data volume weight of the data request of each grid partition of each ecological grid, thereby obtaining The priority value of each data request, according to the order of the sorting result of the priority value, the task of sending data requests to the cloud server is carried out in sequence, so as to realize the intelligent distribution and efficient co-processing of data request events, so as to achieve the optimal response to data requests. Improved processing efficiency and efficient allocation of processing time to data requests.
尽管本公开的描述已经相当详尽且特别对几个所述实施例进行了描述,但其并非旨在局限于任何这些细节或实施例或任何特殊实施例,从而有效地涵盖本公开的预定范围。此外,上文以发明人可预见的实施例对本公开进行描述,其目的是为了提供有用的描述,而那些目前尚未预见的对本公开的非实质性改动仍可代表本公开的等效改动。Although the present disclosure has been described in considerable detail and with particular reference to a few of the described embodiments, it is not intended to be limited to any of these details or embodiments or to any particular embodiment so as to effectively encompass the intended scope of the present disclosure. Furthermore, the foregoing description of the present disclosure in terms of embodiments foreseen by the inventors is intended to provide a useful description, and those insubstantial modifications of the present disclosure that are not presently foreseen may nevertheless represent equivalent modifications of the present disclosure.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110762125.8A CN113626426B (en) | 2021-07-06 | 2021-07-06 | A method and system for collecting and transmitting ecological grid data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110762125.8A CN113626426B (en) | 2021-07-06 | 2021-07-06 | A method and system for collecting and transmitting ecological grid data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113626426A CN113626426A (en) | 2021-11-09 |
CN113626426B true CN113626426B (en) | 2022-06-14 |
Family
ID=78379161
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110762125.8A Expired - Fee Related CN113626426B (en) | 2021-07-06 | 2021-07-06 | A method and system for collecting and transmitting ecological grid data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113626426B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114244904B (en) * | 2021-12-15 | 2023-05-09 | 平安科技(深圳)有限公司 | Remote sensing data transmission method, device, equipment and medium |
CN114331790B (en) * | 2022-03-09 | 2022-07-12 | 中国测绘科学研究院 | Grid processing method and system for incomplete edges of population data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7480640B1 (en) * | 2003-12-16 | 2009-01-20 | Quantum Leap Research, Inc. | Automated method and system for generating models from data |
CN109724644A (en) * | 2018-12-29 | 2019-05-07 | 湖南大学 | An environmental data collection method, system, computer device and storage medium |
CN110458048A (en) * | 2019-07-23 | 2019-11-15 | 南京林业大学 | Spatial-temporal evolution and cognition of population distribution considering the characteristics of urban pattern |
CN111371899A (en) * | 2020-03-13 | 2020-07-03 | 山东三电新能源技术有限公司 | Data acquisition method and system suitable for large-scale distributed photovoltaic |
CN112669340A (en) * | 2020-12-23 | 2021-04-16 | 佛山市城市规划设计研究院 | GIS big data analysis-based public facility site selection method and system |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8559976B2 (en) * | 2010-11-09 | 2013-10-15 | Ntt Docomo, Inc. | System and method for population tracking, counting, and movement estimation using mobile operational data and/or geographic information in mobile network |
US20140032271A1 (en) * | 2012-07-20 | 2014-01-30 | Environmental Systems Research Institute (ESRI) | System and method for processing demographic data |
WO2017168651A1 (en) * | 2016-03-30 | 2017-10-05 | 株式会社Agoop | Population estimation device, program, and population estimation method |
US11550820B2 (en) * | 2017-04-28 | 2023-01-10 | Oracle International Corporation | System and method for partition-scoped snapshot creation in a distributed data computing environment |
CN109934634A (en) * | 2019-03-16 | 2019-06-25 | 义乌市腾飞汽车代驾服务有限公司 | Map grid arrangement method, device, system, computer equipment and storage medium |
CN110263059B (en) * | 2019-05-24 | 2021-05-11 | 湖南大学 | Spark-Streaming intermediate data partitioning method, apparatus, computer equipment and storage medium |
CN110543504A (en) * | 2019-09-06 | 2019-12-06 | 丁睿 | Population thermodynamic data statistical method and system based on space-time matching and storage medium |
CN110704542A (en) * | 2019-10-15 | 2020-01-17 | 南京莱斯网信技术研究院有限公司 | Data dynamic partitioning system based on node load |
CN111915465A (en) * | 2020-07-09 | 2020-11-10 | 暨南大学 | Distribution method and system for atmospheric surface source emission list |
CN112085250B (en) * | 2020-07-30 | 2024-02-13 | 中国科学院城市环境研究所 | Population space distribution simulation method, terminal equipment and storage medium |
CN112235727B (en) * | 2020-09-02 | 2022-11-01 | 武汉烽火众智数字技术有限责任公司 | Personnel flow monitoring and analyzing method and system based on MAC data |
CN112966899B (en) * | 2021-02-03 | 2021-10-29 | 北京大学 | A decision-making method for the construction of urban public service facilities that affects population density |
-
2021
- 2021-07-06 CN CN202110762125.8A patent/CN113626426B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7480640B1 (en) * | 2003-12-16 | 2009-01-20 | Quantum Leap Research, Inc. | Automated method and system for generating models from data |
CN109724644A (en) * | 2018-12-29 | 2019-05-07 | 湖南大学 | An environmental data collection method, system, computer device and storage medium |
CN110458048A (en) * | 2019-07-23 | 2019-11-15 | 南京林业大学 | Spatial-temporal evolution and cognition of population distribution considering the characteristics of urban pattern |
CN111371899A (en) * | 2020-03-13 | 2020-07-03 | 山东三电新能源技术有限公司 | Data acquisition method and system suitable for large-scale distributed photovoltaic |
CN112669340A (en) * | 2020-12-23 | 2021-04-16 | 佛山市城市规划设计研究院 | GIS big data analysis-based public facility site selection method and system |
Non-Patent Citations (2)
Title |
---|
周源等.气藏复杂水侵动态巨量网格精细数值模拟.《天然气勘探与开发》.2017,第40卷(第04期),第85-89页. * |
肖翩翩.广州市荔湾区社区网格化管理研究.《中国优秀博硕士学位论文全文数据库(硕士)社会科学Ⅰ辑》.2018,第G108-68页. * |
Also Published As
Publication number | Publication date |
---|---|
CN113626426A (en) | 2021-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113626426B (en) | A method and system for collecting and transmitting ecological grid data | |
CN110300084B (en) | IP address-based portrait method and apparatus, electronic device, and readable medium | |
CN111161887B (en) | Prediction method of population size returning from epidemic areas based on big data of population migration | |
WO2020042579A1 (en) | Group classification method and device, electronic device, and storage medium | |
CN115114342B (en) | Digital twin multi-source data anomaly monitoring method and system | |
CN110471900A (en) | Data processing method and terminal device | |
CN106530010A (en) | Collaborative filtering method and apparatus based on fusion of time factor | |
CN108537270A (en) | Image labeling method, terminal device and storage medium based on multi-tag study | |
CN109685698A (en) | A method of population big data service system and platform construction are constructed based on 3S technology | |
CN110046174B (en) | population migration analysis method and system based on big data | |
CN114626735A (en) | Urging case allocation method, urging case allocation device, urging case allocation equipment and computer readable storage medium | |
CN111538859B (en) | Method and device for dynamically updating video tag and electronic equipment | |
CN115147183B (en) | Cloud platform-based chip resource management method, device, equipment and storage medium | |
CN112506875B (en) | File storage method, related device and file storage system | |
CN114390550B (en) | Network type identification method, related device, equipment and storage medium | |
CN112231590B (en) | Content recommendation method, system, computer device and storage medium | |
CN116150483A (en) | Electronic certificate recommendation method, equipment and storage medium based on Bayesian network model | |
CN113609214B (en) | A method and system for data backfeeding based on blockchain | |
CN115934859A (en) | Metadata model processing method and device and electronic equipment | |
CN115509693A (en) | Data optimization method based on cluster Pod scheduling combined with data lake | |
CN115203355A (en) | A target personnel classification method and system based on knowledge graph technology | |
CN115102920B (en) | Individual transmission and management control method based on relational network | |
CN118175150B (en) | A historical building cloud data sharing method and system | |
US12333345B2 (en) | Task allocation across processing units of a distributed system | |
CN114155038B (en) | Epidemic situation affected user identification method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20220614 |
|
CF01 | Termination of patent right due to non-payment of annual fee |