CN111522596A - Scene preloading optimization method and device, electronic equipment and storage medium - Google Patents

Scene preloading optimization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111522596A
CN111522596A CN202010217178.7A CN202010217178A CN111522596A CN 111522596 A CN111522596 A CN 111522596A CN 202010217178 A CN202010217178 A CN 202010217178A CN 111522596 A CN111522596 A CN 111522596A
Authority
CN
China
Prior art keywords
scene
scene information
node
client
sub
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.)
Pending
Application number
CN202010217178.7A
Other languages
Chinese (zh)
Inventor
周和平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Urban Construction Technology Shenzhen Co Ltd
Original Assignee
Ping An Urban Construction Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Urban Construction Technology Shenzhen Co Ltd filed Critical Ping An Urban Construction Technology Shenzhen Co Ltd
Priority to CN202010217178.7A priority Critical patent/CN111522596A/en
Publication of CN111522596A publication Critical patent/CN111522596A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention relates to a big data technology, and discloses a scene preloading optimization method, which comprises the following steps: the method comprises the steps of obtaining a scene information file, respectively storing the scene information file to each sub-node of a pre-constructed distributed system, calling a main node of the distributed system, utilizing the main node to collect and vector-convert the scene information file of each sub-node to obtain a scene information loading set, extracting corresponding scene information from the scene information loading set and calculating to obtain a scene view port set, calculating the maximum number of scene view ports which can be contained by a client according to the scene view port parameters of the client, extracting the scene view ports with the same number as the maximum number of the scene view ports from the scene view port set and preloading the scene view ports to the client. The invention also provides a scene preloading optimization device, electronic equipment and a computer readable storage medium. The invention can solve the problem that the screen of the client only displays partial scene information or does not display the scene information at all.

Description

Scene preloading optimization method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of big data, in particular to a scene preloading optimization method and device, electronic equipment and a readable storage medium.
Background
At present, a common preloading mode for a scene information file is to compile codes in advance, when a user needs the preloading mode, after a request instruction is issued through a client, the codes compiled in advance are operated to call the scene information file to be loaded to the client for display, although the preloading mode can be realized by operating the codes compiled in advance according to the request instruction, the preloading mode is limited by the problems of machine performance and network speed, or the conditions that the scene information file is too large, the performance of client hardware is too poor and the like occur, and the condition that the code operation is finished but only part of the scene information file is displayed or the scene information file is not displayed at all on a client screen occurs.
Disclosure of Invention
The invention provides a scene preloading optimization method, a scene preloading optimization device, electronic equipment and a computer readable storage medium, and mainly aims to solve the problem that a client screen only displays partial scene information or does not display the scene information at all.
In order to achieve the above object, the present invention provides a method for optimizing scene preloading, including:
acquiring a scene information file set, and respectively storing the scene information files to each sub-node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set;
calling a main node of the distributed system, and summarizing and vector converting the scene information files of each sub-node by using the main node to obtain a scene information loading set;
receiving a scene information access request input by a client, extracting corresponding scene information from the scene information loading set according to the scene information access request, and calculating to obtain a scene viewport set;
calculating the maximum number of the scene view ports which can be accommodated by the client according to the scene view port parameters of the client, and extracting the scene view ports which are the same as the maximum number of the scene view ports from the scene view port set to be preloaded to the client.
Optionally, the storing the scene information files to each sub-node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set includes:
classifying the scene information files according to different categories of the scene information files to obtain a group or multi-component scene information files;
and respectively storing the sub-scene information files to each sub-node of a pre-constructed distributed system.
Optionally, after the storing the sub-scene information files to each sub-node of a pre-constructed distributed system, the method further includes:
collecting characteristic pixel points of the scene information files to obtain a characteristic pixel set;
carrying out gray scale map statistics on the scene information files to obtain a gray scale change data set;
counting the color density percentage of the scene information files to obtain a color change data set;
and respectively storing the characteristic pixel set, the gray change data set and the color change data set to corresponding sub-nodes.
Optionally, the collecting and vector converting the scene information files of the respective sub-nodes to obtain a scene information loading set includes:
constructing vectors with the same quantity as each sub-node;
and copying the characteristic pixel set, the gray level change data set and the color change data set stored in each sub-node into corresponding vectors, and collecting each vector to obtain the scene information loading set.
Optionally, the extracting, according to the scene information access request, the corresponding scene information from the scene information loading set and calculating to obtain a scene viewport set includes:
step A: extracting a corresponding characteristic pixel set, a gray change data set and a color change data set from the scene information loading set according to the scene information access request;
and B: selecting two non-repeating characteristic pixels from the characteristic pixel set;
and C: drawing a circle a and a circle b respectively according to a preset radius by taking one of the characteristic pixels as a circle center a and the other characteristic pixel as a circle center b;
step D: calculating the gray color difference values of the circle a and the circle b according to the gray change data set and the color change data set;
step E: and when the gray color difference value is larger than a preset standard difference value, enlarging the preset radius according to a radius enlargement rule, and returning to the step C.
Step F: and when the gray color difference value is smaller than the preset standard difference value, storing the circle a and the circle b as the scene view ports, returning to the step A until the characteristic pixel set selects two non-repeated characteristic pixels, and collecting all the scene view ports to obtain the scene view port set.
Optionally, the taking one of the feature pixels as a circle center a and the other feature pixel as a circle center b includes:
and constructing a coordinate system, mapping one characteristic pixel to the coordinate system to obtain the circle center a and mapping the other characteristic pixel to the coordinate system to obtain the circle center b according to the longitude and latitude data of the two non-repeated characteristic pixels.
Optionally, the calculating a maximum number of scene viewports that the client can accommodate includes:
calculating the maximum number of the scene view ports which can be accommodated by the client by adopting the following calculation method:
Sp=2×(tileMaxCol-tileMinCol+1)+2×(tileMaxRow-tileMinRow+1)+4
wherein tileMaxCon is the number of the scene view ports in the lateral region of the scene view port set in the coordinate system, and tileMinCol calculates the maximum accommodation for the client according to the scene information fileThe number of the scene view ports of the horizontal area, tileMaxRow is the number of the scene view ports of the scene view port set in the vertical area in the coordinate system, tileinroww is the number of the scene view ports of the vertical area which are calculated by the client side according to the scene information file and maximally accommodated, SpIs the number of view ports of the scene.
In order to solve the above problem, the present invention further provides an optimization apparatus for scene preloading, including:
the system comprises a node storage module, a node selection module and a node selection module, wherein the node storage module is used for acquiring a scene information file set and respectively storing the scene information files to each node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set;
the vector conversion module is used for calling a main node of the distributed system, and summarizing and vector converting the scene information files of each sub-node by using the main node to obtain a scene information loading set;
the scene viewport calculation module is used for receiving a scene information access request input by a client, extracting corresponding scene information from the scene information loading set according to the scene information access request and calculating to obtain a scene viewport set;
and the scene preloading module is used for calculating the maximum number of the scene view ports which can be accommodated by the client according to the scene view port parameters of the client, and extracting the scene view ports with the same number as the maximum number of the scene view ports from the scene view port set to preload the scene view ports to the client.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the scene preloading optimization method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, where at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the method for optimizing scene preloading according to any one of the above aspects.
The scene preloading method of the embodiment of the invention comprises the steps of firstly obtaining a scene information file set and storing the scene information file set to a branch node, obtaining a scene information loading set through the collection and vector conversion of the branch node to the scene information file, calculating the scene information loading set to obtain a final scene view port set, and completing the loading process. Therefore, the scene preloading optimization method, the scene preloading optimization device, the electronic equipment and the computer readable storage medium can solve the problem that a client screen only displays partial scene information or does not display the scene information at all.
Drawings
Fig. 1 is a schematic flowchart of a scene preloading optimization method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of an optimization method for scene preloading according to an embodiment of the present invention;
fig. 3 is a schematic internal structural diagram of an electronic device of a scene preloading optimization method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a scene preloading optimization method. Fig. 1 is a schematic flow chart of a scene preloading optimization method according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the method for optimizing the scene preloading includes:
s1, acquiring a scene information file set, and respectively storing the scene information files to each sub-node of a pre-constructed distributed system according to the types of the scene information files in the scene information file set.
According to different requirements of users, the scene information file sets are correspondingly different, for example, a long-distance delivery driver of a certain logistics company receives a delivery task from a city x to a city y which are thousands of miles away at present, so that a great wave Zhao uses a mobile phone to check various geographical route maps from the city x to the city y, and each geographical route map from the city x to the city y is one scene information file.
In detail, the storing the scene information files to the sub-nodes of the pre-constructed distributed system according to the category of each scene information file in the scene information file set includes: classifying the scene information files according to different categories of the scene information files to obtain a group or multi-component scene information files; and respectively storing the sub-scene information files to each sub-node of a pre-constructed distributed system.
The types of the scene information file sets comprise bim image files, shp image files, cgr image files and the like, so that the embodiment of the invention can store the sub-scene information files of the bim image files to the first sub-node, the sub-scene information files of the shp image files to the second sub-node and the cgr image file sub-scene information files to the third sub-node.
Further, after the storing the sub-scene information files to each sub-node of the pre-constructed distributed system, the embodiment of the present invention further includes: collecting characteristic pixel points of the scene information files to obtain a characteristic pixel set; carrying out gray scale map statistics on the scene information files to obtain a gray scale change data set; counting the color density percentage of the scene information files to obtain a color change data set; and respectively storing the characteristic pixel set, the gray change data set and the color change data set to corresponding sub-nodes.
The characteristic pixel points refer to pixel points capable of representing the overall characteristics of the geographic information file, such as pixel points in a light and shade boundary area, pixel points in a geometric center of a same or similar color area, pixel points in a geometric center of a color change transition area, and the like.
The gray map statistics are to summarize the change of the whole gray of each sub-scene information file, and can adopt the currently disclosed methods such as an integer algorithm, an integer shift algorithm and the like. The color change data set refers to the ratio of the range covered by each color of each scene information file.
And S2, calling the main node of the distributed system, and summarizing and vector converting the scene information files of each sub-node by using the main node to obtain a scene information loading set.
In detail, the collecting and vector converting the scene information files of the respective sub-nodes to obtain a scene information loading set includes: and constructing vectors with the same number as the sub-nodes, copying the characteristic pixel sets, the gray level change data sets and the color change data sets stored in the sub-nodes into corresponding vectors, and collecting each vector to obtain a scene information loading set.
As described above, there are five geographic roadmaps from city x to city y, and the vector form of each geographic roadmap is: [ feature pixel set, gradation change data set, color change data set ].
And S3, receiving a scene information access request input by a client, extracting corresponding scene information from the scene information loading set according to the scene information access request, and calculating to obtain a scene viewport set.
In detail, the extracting, according to the scene information access request, the corresponding scene information from the scene information loading set and calculating to obtain a scene viewport set includes:
step A: extracting a corresponding characteristic pixel set, a gray change data set and a color change data set from the scene information loading set according to the scene information access request;
and B: selecting two non-repeating characteristic pixels from the characteristic pixel set;
and C: drawing a circle a and a circle b respectively according to a preset radius by taking one of the characteristic pixels as a circle center a and the other characteristic pixel as a circle center b;
step D: calculating the gray color difference values of the circle a and the circle b according to the gray change data set and the color change data set;
step E: and when the gray color difference value is larger than a preset standard difference value, enlarging the preset radius according to a radius enlargement rule, and returning to the step C.
Step F: and when the gray color difference value is smaller than the preset standard difference value, storing the circle a and the circle b as the scene view ports, returning to the step A until the characteristic pixel set selects two non-repeated characteristic pixels, and collecting all the scene view ports to obtain the scene view port set.
If Zhao tao wants to access the second geographical route map from city x to city y, the scene information access request of the second geographical route map is clicked, and the characteristic pixel set, the gray change data set and the color change data set in the form of vectors are extracted from the scene information loading set according to the scene information access request of the second geographical route map.
Further, the taking one of the feature pixels as a circle center a and the other feature pixel as a circle center b includes: and constructing a coordinate system, mapping one characteristic pixel to the coordinate system to obtain the circle center a according to the longitude and latitude data of the characteristic pixel, and mapping the other characteristic pixel to the coordinate system to obtain the circle center b.
The scene view port is a display area (e.g., a rectangular display area, a circular display area, etc.) associated with the display device, the coordinate unit of the scene view port is a pixel associated with the display device, and the pixel is the smallest area of the screen displaying a specific color. The main step of S3, described in connection with S3, is to determine a satisfactory scene viewport.
S4, calculating the maximum number of scene view ports that can be accommodated by the client according to the scene view port parameters of the client, and extracting the same number of scene view ports as the maximum number of scene view ports from the scene view port set and preloading the scene view ports to the client.
Because the calculated number of scene view ports included in the scene view port set is based on an ideal condition and does not combine the scene view port capability of an actual client, the number of scene view ports that can be preloaded at one time needs to be determined further according to the scene view port parameters of the client.
Similarly, the calculating a maximum number of scene viewports that the client can accommodate includes:
calculating the maximum number of the scene view ports which can be accommodated by the client by adopting the following calculation method:
Sp=2×(tileMaxCol-tileMinCol+1)+2×(tileMaxRow-tileMinRow+1)+4
wherein tileMaxCol is the number of scene view ports of the scene view port set in the lateral region in the coordinate system, tilminecol is the number of scene view ports of the lateral region maximally accommodated by the client according to the scene information file, tileMaxRow is the number of scene view ports of the scene view port set in the longitudinal region in the coordinate system, tilminerrow is the number of scene view ports of the longitudinal region maximally accommodated by the client according to the scene information file, SpIs the number of view ports of the scene.
Obtaining a scene view port set of a second geographical route map from the city x to the city y by calculation according to the second geographical route map from the Zhao billow, wherein the second geographical route map is from the city x to the city ypExtracting the same number of scene view ports from the scene view port set to preload to the mobile phones of billows.
Fig. 2 is a functional block diagram of the scene preloading optimization device according to the present invention.
The scene preloading optimization device 100 can be installed in an electronic device. According to the implemented functions, the scene preloading optimization device may include a partial node storage module 101, a vector conversion module 102, a scene viewport calculation module 103, and a scene preloading module 104. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the node storage module 101 is configured to acquire a scene information file set, and store the scene information files to each node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set;
the vector conversion module 102 is configured to invoke a master node of the distributed system, and use the master node to perform summarization and vector conversion on the scene information files of the respective sub-nodes to obtain a scene information loading set;
the scene viewport computation module 103 is configured to receive a scene information access request input by a client, extract corresponding scene information from the scene information loading set according to the scene information access request, and compute to obtain a scene viewport set;
the scene preloading module 104 is configured to calculate a maximum number of scene view ports that can be accommodated by the client according to the scene view port parameters of the client, and extract, from the scene view port set, the same number of scene view ports as the maximum number of scene view ports to preload the client.
In detail, when being executed by a processor of the electronic device, each module of the scene preloading optimization device may implement the following method steps:
the sub-node storage module 101 acquires a scene information file set, and stores the scene information files to each sub-node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set.
According to different requirements of users, the scene information file sets are correspondingly different, for example, a long-distance delivery driver of a certain logistics company receives a delivery task from a city x to a city y which are thousands of miles away at present, so that a lot Zhao uses a mobile phone to check various geographical route maps from the city x to the city y, and the various geographical route maps from the city x to the city y are the scene information files.
In detail, the sub-node storing module 101 stores the scene information files to each sub-node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set, including: classifying the scene information files according to different categories of the scene information files to obtain a group or multi-component scene information files; and respectively storing the sub-scene information files to each sub-node of a pre-constructed distributed system.
The types of the scene information file set include a bim image file, a shp image file, a cgr image file, and the like, and therefore, the sub-node storage module 101 may store the sub-scene information file of the bim image file to the first sub-node, the sub-scene information file of the shp image file to the second sub-node, and the cgr image file sub-scene information file to the third sub-node.
Further, after the sub-scene information files are respectively stored in the sub-nodes of the pre-constructed distributed system, the sub-node storage module 101 may further perform: collecting characteristic pixel points of the scene information files to obtain a characteristic pixel set; carrying out gray scale map statistics on the scene information files to obtain a gray scale change data set; counting the color density percentage of the scene information files to obtain a color change data set; and respectively storing the characteristic pixel set, the gray change data set and the color change data set to corresponding sub-nodes.
The characteristic pixel points refer to pixel points capable of representing the overall characteristics of the geographic information file, such as pixel points in a light and shade boundary area, pixel points in a geometric center of a same or similar color area, pixel points in a geometric center of a color change transition area, and the like.
The gray map statistics are to summarize the change of the whole gray of each sub-scene information file, and can adopt the currently disclosed methods such as an integer algorithm, an integer shift algorithm and the like. The color change data set refers to the ratio of the range covered by each color of each scene information file.
The vector conversion module 102 calls a master node of the distributed system, and the master node is used for summarizing and vector converting the scene information files of each sub-node to obtain a scene information loading set.
In detail, the collecting and vector converting the scene information files of the respective sub-nodes to obtain a scene information loading set includes: and constructing vectors with the same number as the sub-nodes, copying the characteristic pixel sets, the gray level change data sets and the color change data sets stored in the sub-nodes into corresponding vectors, and collecting each vector to obtain a scene information loading set.
As described above, there are five geographic roadmaps from city x to city y, and the vector form of each geographic roadmap is: [ feature pixel set, gradation change data set, color change data set ].
The scene viewport computation module 103 receives a scene information access request input by a client, extracts corresponding scene information from the scene information loading set according to the scene information access request, and computes a scene viewport set.
In detail, the extracting, according to the scene information access request, the corresponding scene information from the scene information loading set and calculating to obtain a scene viewport set includes:
step A: extracting a corresponding characteristic pixel set, a gray change data set and a color change data set from the scene information loading set according to the scene information access request;
and B: selecting two non-repeating characteristic pixels from the characteristic pixel set;
and C: drawing a circle a and a circle b respectively according to a preset radius by taking one of the characteristic pixels as a circle center a and the other characteristic pixel as a circle center b;
step D: calculating the gray color difference values of the circle a and the circle b according to the gray change data set and the color change data set;
step E: and when the gray color difference value is larger than a preset standard difference value, enlarging the preset radius according to a radius enlargement rule, and returning to the step C.
Step F: and when the gray color difference value is smaller than the preset standard difference value, storing the circle a and the circle b as the scene view ports, returning to the step A until the characteristic pixel set selects two non-repeated characteristic pixels, and collecting all the scene view ports to obtain the scene view port set.
If a user wants to access the second geographical route map from city x to city y in zhao tao, and therefore clicks on the scene information access request of the second geographical route map, the scene viewport computation module 103 extracts a feature pixel set, a gray change data set and a color change data set in the form of a vector from the scene information loading set according to the scene information access request of the second geographical route map.
Further, the taking one of the feature pixels as a circle center a and the other feature pixel as a circle center b includes: and constructing a coordinate system, mapping one characteristic pixel to the coordinate system to obtain the circle center a according to the longitude and latitude data of the characteristic pixel, and mapping the other characteristic pixel to the coordinate system to obtain the circle center b.
The scene view port is a display area (e.g., a rectangular display area, a circular display area, etc.) associated with the display device, the coordinate unit of the scene view port is a pixel associated with the display device, and the pixel is the smallest area of the screen displaying a specific color. The main step of S3, described in connection with S3, is to determine a satisfactory scene viewport.
The scene preloading module 104 calculates a maximum number of scene view ports that can be accommodated by the client according to the scene view port parameters of the client, and extracts the same number of scene view ports from the scene view port set as the maximum number of scene view ports to preload the client.
Because the calculated number of scene view ports included in the scene view port set is based on an ideal condition and does not combine the scene view port capability of an actual client, the scene preloading module 104 needs to further determine the number of scene view ports that can be preloaded at one time according to the scene view port parameters of the client.
Similarly, the calculating a maximum number of scene viewports that the client can accommodate includes:
calculating the maximum number of the scene view ports which can be accommodated by the client by adopting the following calculation method:
Sp=2×(tileMaxCol-tileMinCol+1)+2×(tileMaxRow-tileMinRow+1)+4
wherein tileMaxCol is the number of scene view ports of the scene view port set in the lateral region in the coordinate system, tilminecol is the number of scene view ports of the lateral region maximally accommodated by the client according to the scene information file, tileMaxRow is the number of scene view ports of the scene view port set in the longitudinal region in the coordinate system, tilminerrow is the number of scene view ports of the longitudinal region maximally accommodated by the client according to the scene information file, SpIs the number of view ports of the scene.
Obtaining a scene view port set of a second geographical route map from the city x to the city y by calculation according to the second geographical route map from the Zhao billow, wherein the second geographical route map is from the city x to the city ypExtracting the same number of scene view ports from the scene view port set to preload to the mobile phones of billows.
Fig. 3 is a schematic structural diagram of an electronic device implementing the optimization method for scene preloading according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a scene pre-loaded optimization program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of a scene preloading optimization program, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., executing a scene preloading optimization program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The scene pre-loaded optimization program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, can implement:
acquiring a scene information file set, and respectively storing the scene information files to each sub-node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set;
calling a main node of the distributed system, and summarizing and vector converting the scene information files of each sub-node by using the main node to obtain a scene information loading set;
receiving a scene information access request input by a client, extracting corresponding scene information from the scene information loading set according to the scene information access request, and calculating to obtain a scene viewport set;
calculating the maximum number of the scene view ports which can be accommodated by the client according to the scene view port parameters of the client, and extracting the scene view ports which are the same as the maximum number of the scene view ports from the scene view port set to be preloaded to the client.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiments corresponding to fig. 1 and fig. 2, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for optimizing scene preloading, the method comprising:
acquiring a scene information file set, and respectively storing the scene information files to each sub-node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set;
calling a main node of the distributed system, and summarizing and vector converting the scene information files of each sub-node by using the main node to obtain a scene information loading set;
receiving a scene information access request input by a client, extracting corresponding scene information from the scene information loading set according to the scene information access request, and calculating to obtain a scene viewport set;
calculating the maximum number of the scene view ports which can be accommodated by the client according to the scene view port parameters of the client, and extracting the scene view ports which are the same as the maximum number of the scene view ports from the scene view port set to be preloaded to the client.
2. The method as claimed in claim 1, wherein the step of storing the scene information files to respective sub-nodes of a pre-constructed distributed system according to the category of each scene information file in the scene information file set comprises:
classifying the scene information files according to different categories of the scene information files to obtain a group or multi-component scene information files;
and respectively storing the sub-scene information files to each sub-node of a pre-constructed distributed system.
3. The method for optimizing the preloading of scenes as claimed in claim 2, wherein after storing the sub-scene information files to the sub-nodes of the pre-constructed distributed system respectively, the method further comprises:
collecting characteristic pixel points of the scene information files to obtain a characteristic pixel set;
carrying out gray scale map statistics on the scene information files to obtain a gray scale change data set;
counting the color density percentage of the scene information files to obtain a color change data set;
and respectively storing the characteristic pixel set, the gray change data set and the color change data set to corresponding sub-nodes.
4. The method according to claim 3, wherein the step of summarizing and vector-converting the scene information files of the respective sub-nodes to obtain a scene information loading set comprises:
constructing vectors with the same quantity as each sub-node;
and copying the characteristic pixel set, the gray level change data set and the color change data set stored in each sub-node into corresponding vectors, and collecting each vector to obtain the scene information loading set.
5. The method for optimizing scene preloading according to claim 4, wherein said extracting corresponding scene information from said scene information loadset according to said scene information access request and calculating a scene viewport set comprises:
step A: extracting a corresponding characteristic pixel set, a gray change data set and a color change data set from the scene information loading set according to the scene information access request;
and B: selecting two non-repeating characteristic pixels from the characteristic pixel set;
and C: drawing a circle a and a circle b respectively according to a preset radius by taking one of the characteristic pixels as a circle center a and the other characteristic pixel as a circle center b;
step D: calculating the gray color difference values of the circle a and the circle b according to the gray change data set and the color change data set;
step E: and when the gray color difference value is larger than a preset standard difference value, enlarging the preset radius according to a radius enlargement rule, and returning to the step C.
Step F: and when the gray color difference value is smaller than the preset standard difference value, storing the circle a and the circle b as the scene view ports, returning to the step A until the characteristic pixel set selects two non-repeated characteristic pixels, and collecting all the scene view ports to obtain the scene view port set.
6. The method for optimizing the preloading of the scene as recited in claim 1, wherein said taking one of the characteristic pixels as a center a and the other characteristic pixel as a center b comprises:
and constructing a coordinate system, mapping one characteristic pixel to the coordinate system to obtain the circle center a and mapping the other characteristic pixel to the coordinate system to obtain the circle center b according to the longitude and latitude data of the two non-repeated characteristic pixels.
7. The method for optimizing scene preloading according to claim 6, wherein said calculating a maximum number of scene viewports that can be accommodated by said client comprises:
calculating the maximum number of the scene view ports which can be accommodated by the client by adopting the following calculation method:
Sp=2×(tileMaxCol-tileMinCol+1)+2×(tileMaxRow-tileMinRow+1)+4
wherein tileMaxCol is the number of scene view ports of the scene view port set in the lateral region in the coordinate system, tilminecol is the number of scene view ports of the lateral region maximally accommodated by the client according to the scene information file, tileMaxRow is the number of scene view ports of the scene view port set in the longitudinal region in the coordinate system, tilminerrow is the number of scene view ports of the longitudinal region maximally accommodated by the client according to the scene information file, SpIs the number of view ports of the scene.
8. An apparatus for optimizing scene preloading, the apparatus comprising:
the system comprises a node storage module, a node selection module and a node selection module, wherein the node storage module is used for acquiring a scene information file set and respectively storing the scene information files to each node of a pre-constructed distributed system according to the category of each scene information file in the scene information file set;
the vector conversion module is used for calling a main node of the distributed system, and summarizing and vector converting the scene information files of each sub-node by using the main node to obtain a scene information loading set;
the scene viewport calculation module is used for receiving a scene information access request input by a client, extracting corresponding scene information from the scene information loading set according to the scene information access request and calculating to obtain a scene viewport set;
and the scene preloading module is used for calculating the maximum number of the scene view ports which can be accommodated by the client according to the scene view port parameters of the client, and extracting the scene view ports with the same number as the maximum number of the scene view ports from the scene view port set to preload the scene view ports to the client.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of optimizing scene preloading as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the method for optimizing scene preloading according to any one of claims 1 to 7.
CN202010217178.7A 2020-03-25 2020-03-25 Scene preloading optimization method and device, electronic equipment and storage medium Pending CN111522596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010217178.7A CN111522596A (en) 2020-03-25 2020-03-25 Scene preloading optimization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010217178.7A CN111522596A (en) 2020-03-25 2020-03-25 Scene preloading optimization method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111522596A true CN111522596A (en) 2020-08-11

Family

ID=71901338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010217178.7A Pending CN111522596A (en) 2020-03-25 2020-03-25 Scene preloading optimization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111522596A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6021222A (en) * 1994-08-16 2000-02-01 Ricoh Co., Ltd. System and method for the detection of a circle image for pattern recognition
CN103677930A (en) * 2013-12-19 2014-03-26 广东威创视讯科技股份有限公司 GIS data loading method and device based on mosaic wall system
CN106447683A (en) * 2016-08-09 2017-02-22 上海柏楚电子科技有限公司 Feature extraction algorithm of circles
CN107193521A (en) * 2017-06-08 2017-09-22 西安万像电子科技有限公司 Data processing method, device and system
US9849384B1 (en) * 2014-12-16 2017-12-26 Amazon Technologies, Inc. Viewport selection system
CN109186618A (en) * 2018-08-31 2019-01-11 平安科技(深圳)有限公司 Map constructing method, device, computer equipment and storage medium
CN109675309A (en) * 2019-02-01 2019-04-26 网易(杭州)网络有限公司 A kind of building method and device of scene of game

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6021222A (en) * 1994-08-16 2000-02-01 Ricoh Co., Ltd. System and method for the detection of a circle image for pattern recognition
CN103677930A (en) * 2013-12-19 2014-03-26 广东威创视讯科技股份有限公司 GIS data loading method and device based on mosaic wall system
US9849384B1 (en) * 2014-12-16 2017-12-26 Amazon Technologies, Inc. Viewport selection system
CN106447683A (en) * 2016-08-09 2017-02-22 上海柏楚电子科技有限公司 Feature extraction algorithm of circles
CN107193521A (en) * 2017-06-08 2017-09-22 西安万像电子科技有限公司 Data processing method, device and system
CN109186618A (en) * 2018-08-31 2019-01-11 平安科技(深圳)有限公司 Map constructing method, device, computer equipment and storage medium
CN109675309A (en) * 2019-02-01 2019-04-26 网易(杭州)网络有限公司 A kind of building method and device of scene of game

Similar Documents

Publication Publication Date Title
US9134886B2 (en) Providing indoor facility information on a digital map
CN110516002B (en) Map-based task display method, device, equipment and storage medium
CN113554008B (en) Method and device for detecting static object in area, electronic equipment and storage medium
CN114781768B (en) Parking lot facility planning method, device and equipment based on urban resource data
CN101354255B (en) System and method for displaying electronic map
CN113658292A (en) Method, device and equipment for generating meteorological data color spot pattern and storage medium
CN111181769B (en) Network topological graph drawing method, system, device and computer readable storage medium
CN114201571B (en) Gas station recommendation method and device, electronic equipment and storage medium
CN112216112B (en) Beidou positioning and induced parking system and method based on scene of integration with internet of things
CN114792111A (en) Data acquisition method and device, electronic equipment and storage medium
CN111522596A (en) Scene preloading optimization method and device, electronic equipment and storage medium
CN112601178A (en) Edge gateway positioning method and device, electronic equipment and storage medium
CN111198927B (en) Geographic position data matching method and device, electronic equipment and storage medium
CN114020755B (en) Image map tile publishing method, image map tile generating method and device
CN112528701B (en) Two-dimensional code detection method and device, electronic equipment and medium
CN114265914A (en) Robot display method, device, equipment and storage medium
CN113190703A (en) Intelligent retrieval method and device for video image, electronic equipment and storage medium
CN112632422A (en) Intelligent image cutting method and device, electronic equipment and storage medium
CN115455369B (en) Real estate registration platform construction method and device
CN115100081B (en) LCD display screen gray scale image enhancement method, device, equipment and storage medium
CN115269945B (en) Big data visualization analysis method and device
CN116561081B (en) Data processing method, device, electronic equipment, storage medium and program product
CN103246689B (en) The Forecasting Methodology of a kind of raster data and device
CN112132140B (en) Vehicle brand identification method, device, equipment and medium based on artificial intelligence
CN111652226A (en) Image-based target identification method and device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200811

WD01 Invention patent application deemed withdrawn after publication