Map level information file generation method, device, equipment and storage medium

By analyzing pixel information in map hierarchical pictures and associating map business layer data, the map hierarchical information files are generated, which solves the problem of inefficient development of traditional virtual maps and realizes efficient map data processing and synchronization.

CN114218338BActive Publication Date: 2025-04-15广州三七极耀网络科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111299481.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-04
Publication Date
2025-04-15
Estimated Expiration
2041-11-04

AI Technical Summary

Technical Problem

During the development of traditional virtual maps, developers need to manually edit map data, resulting in inefficient development, and the synchronization and maintenance of map data are complex and error-prone.

Method used

By acquiring map-level pictures, analyzing pixel information of pixel units, determining the target pixel unit, and associating the data of the map service layer to generate a map-level information file.

Benefits of technology

It realizes the rapid and efficient conversion of map-level pictures into data information used to describe the virtual map business layer, improves the development efficiency of virtual maps, and simplifies the synchronization and maintenance of map data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218338B_ABST
    Figure CN114218338B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and storage medium for generating a map level information file. The method comprises: obtaining a map level picture; parsing the pixel information of each pixel unit in the map level picture, and determining the target pixel unit according to the pixel information of each pixel unit; and associating the map data of the target map business layer for each target pixel unit according to the target map business layer mapped by the map level picture, and generating a map level information file of the target map business layer. The method can improve the development efficiency of virtual maps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for generating a map level information file. Background Art

[0002] With the development of computer technology, virtual map technology has emerged. Virtual maps contain a large amount of map data. Editing and maintaining map data in virtual maps is one of the important tasks in virtual map development.

[0003] In the traditional virtual map development process, developers need to use the editing engine to manually edit the map design drawings based on the pre-drawn map design drawings. For example, after the developers get the map design drawings, they see that there are several "trees" in the lower right corner of the map design drawings. Then, they will select the "tree" resource in the editing engine and put it in the lower right corner of the virtual map in the engine. Then they will manually check whether the positions of these "trees" in the map design drawings and in the virtual map are consistent, so as to complete the editing of the entire virtual map bit by bit. However, this manual editing method wastes both time and manpower, making the development efficiency of virtual maps very low. In addition, synchronizing the map data to the server database after editing is also an extremely complex and tedious task, and the subsequent maintenance of the map data is also an extremely difficult and error-prone task. Therefore, we need a map development solution that is efficient, simple to operate, easy to adjust, and supports data synchronization. Summary of the invention

[0004] Based on this, it is necessary to provide a map level information file generation method, device, computer equipment and storage medium that can improve the efficiency of virtual map development in response to the above technical problems.

[0005] A method for generating a map level information file, the method comprising: obtaining a map level picture; parsing pixel information of each pixel unit in the map level picture, and determining a target pixel unit according to the pixel information of each pixel unit; and associating map data of a target map business layer for each target pixel unit according to a target map business layer mapped by the map level picture, and generating a map level information file of the target map business layer.

[0006] In one embodiment, determining the target pixel unit according to the pixel information of each pixel unit includes: determining the pixel unit whose pixel information matches the preset information as the target pixel unit.

[0007] In one embodiment, a pixel unit includes multiple pixel points, and parsing the pixel information of each pixel unit in the map level image includes: obtaining the pixel information of each pixel point in the pixel unit; counting the number of pixel points carrying different pixel information in the pixel unit respectively; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.

[0008] In one embodiment, the map data of the target map business layer is associated with each target pixel unit, and a map level information file of the target map business layer is generated, including: generating a two-dimensional array to be assigned based on the size information of the map level picture and the size information of each pixel unit; determining the coordinate information of each target pixel unit in the map level picture; determining the target element corresponding to each target pixel unit in the two-dimensional array to be assigned; using each coordinate information as the index value of each target element and the map data of the target map business layer as the value of each target element, assigning the two-dimensional array to be assigned to obtain an assigned two-dimensional array; and generating a map level information file of the target map business layer based on the assigned two-dimensional array.

[0009] In one embodiment, the method further includes: displaying the assigned two-dimensional array in a display interface; and in response to a modification operation on the value of any element in the assigned two-dimensional array, updating the value of the element corresponding to the modification operation.

[0010] In one embodiment, the method further includes: acquiring a new map layer image in response to a replacement instruction for the target map service layer; and generating a map layer information file of the target map service layer according to the new map layer image.

[0011] In one embodiment, the method further includes: rendering and generating a virtual map business layer according to a map level information file; in response to a trigger operation on any position in the virtual map business layer, determining a pixel unit to be edited corresponding to the trigger operation; in response to a modification operation on map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.

[0012] A map level information file generating device, the device comprising:

[0013] Image acquisition module, used to obtain map level images;

[0014] A pixel analysis module is used to analyze the pixel information of each pixel unit in the map layer image, and determine the target pixel unit according to the pixel information of each pixel unit;

[0015] The file generation module is used to associate the map data of the target map business layer for each target pixel unit according to the target map business layer mapped by the map level picture, and generate a map level information file of the target map business layer.

[0016] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for generating a map level information file are implemented.

[0017] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned map level information file generation method.

[0018] The above-mentioned map level information file generation method, device, computer equipment and storage medium analyze the map level image, determine the target pixel unit in the map level image, and associate the map data of the map business layer corresponding to the map level image for each target pixel unit, thereby converting the map level image into a map level information file for describing the data information of the virtual map business layer. With this method, the user no longer needs to manually edit the map data of each business layer of the virtual map by referring to the map level image, but can quickly and efficiently convert the map level image into a map level information file for describing the data information of the virtual map business layer by importing the map level image, thereby improving the development efficiency of the virtual map. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A diagram of an application environment of a method for generating a map level information file in an embodiment;

[0020] Figure 2 It is a flowchart of a method for generating a map level information file in one embodiment;

[0021] Figure 3 A schematic flow chart of steps for generating a map level information file of a target map service layer in one embodiment;

[0022] Figure 4 A schematic diagram of modifying map data in a virtual map service layer in one embodiment;

[0023] Figure 5 It is a structural block diagram of a map level information file generating device in one embodiment;

[0024] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0026] The map level information file generation method provided in this application can be applied to Figure 1 In the application environment shown. The terminal 102 obtains a map-level image; parses the pixel information of each pixel unit in the map-level image, and determines the target pixel unit according to the pixel information of each pixel unit; and associates the map data of the target map business layer for each target pixel unit according to the target map business layer mapped by the map-level image, and generates a map-level information file of the target map business layer. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.

[0027] In one embodiment, Figure 2 As shown, a method for generating a map layer information file is provided, and the method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:

[0028] Step S202: Obtain map layer images.

[0029] Among them, the map level picture can be a binary picture that describes the relevant information of any map business layer of the map in the form of a binary image. Each pixel on the binary image has only two possible pixel values ​​or pixel grayscale states. Therefore, the binary image can also be called a black and white image or a monochrome image. The map level picture can also be a picture that describes the relevant information of any map business layer of the map in the form of a color image, a transparency image, etc. As an image file, the map level picture can be saved in any image format and is not limited here. The map business layer refers to the layer of the map that contains a certain type of business data, for example, a map business layer that represents movable area data, a map business layer that represents terrain rendering data, a map business layer that represents public resource point location data, and so on.

[0030] In this step, the user can select the map level picture for which he wants to generate a map level information file, and trigger the picture import instruction to import the selected map level picture into the terminal. The terminal responds to the picture import instruction triggered by the user and obtains the imported map level picture.

[0031] Step S204: parsing pixel information of each pixel unit in the map level image, and determining the target pixel unit according to the pixel information of each pixel unit.

[0032] Among them, the pixel unit may include only one pixel point, or may include multiple pixel points, that is, one pixel point may be used as a pixel unit, or a cell composed of multiple pixel points may be used as a pixel unit. The size and shape of the cell composed of multiple pixel points are not limited, and can be customized according to needs. For example, if a map level information file of a hexagonal grid virtual map needs to be generated, the shape of the pixel unit can be set to a hexagonal grid. The target pixel unit refers to a pixel unit whose pixel information meets the conditions determined from multiple pixel units in the map level picture.

[0033] Among them, pixel information refers to information that reflects pixel characteristics. For example, for a binary image that describes information as a binary image, each pixel thereon has only two possible pixel values, namely "0" or "1"; or, each pixel thereon has only two possible grayscale states, namely "level 0" or "level 255". Therefore, if the map-level image is a binary image, the pixel information may include pixel values ​​or pixel grayscale information. For images that describe information as color images, the pixel information may also include pixel color values, etc. For images that describe information as transparency images, the pixel information may also include pixel transparency values, etc.

[0034] In this step, after obtaining the map level image imported by the user, the terminal can perform image analysis on the map level image to analyze pixel information such as pixel value or pixel grayscale level of each pixel unit in the map level image, and judge whether the pixel information meets the set conditions based on the pixel information obtained by analysis, and determine the pixel unit whose pixel information meets the conditions as the target pixel unit.

[0035] Exemplarily, when a pixel point is regarded as a pixel unit, the terminal can use the pixel information of each pixel point as the pixel information of the pixel unit corresponding to the pixel point; when a cell composed of multiple pixel points is regarded as a pixel unit, the terminal can obtain the pixel information of each pixel point in the pixel unit respectively, and determine the pixel information of the pixel unit after performing statistical analysis on the pixel information of each pixel point.

[0036] Step S206: according to the target map service layer mapped by the map layer image, map data of the target map service layer is associated with each target pixel unit to generate a map layer information file of the target map service layer.

[0037] The map data refers to the data reflecting the geographical characteristics in the virtual map, which can be numbers, enumeration values, character strings, etc. The map layer information file refers to a computer-readable file used to describe the map data information of a certain business layer of the virtual map. The business layers of the virtual map can be rendered and generated according to the map layer information files.

[0038] Specifically, a map level picture can be configured to map at least one map service layer. The mapping relationship between the map level picture and the map service layer can be customized. For example, a user can customize the mapping relationship between the map level picture and the map service layer through the display interface of the terminal, and submit the configured data representing the mapping relationship between the two to the terminal, so that the terminal uses the map service layer mapped by the map level picture as the target map service layer according to the mapping relationship configured by the user, and associates the map data of the target map service layer with the target pixel unit in the map level picture, thereby converting the map level picture into a map level information file for describing the information of the target map service layer.

[0039] Exemplarily, a user can import a map level picture into the terminal, and the user can configure the mapping relationship between the map level picture and the map business layer through the display interface of the terminal. If the user configures the map level picture to map the grass layer of the map, the terminal can associate the map data of the grass layer for each target pixel unit of the map level picture according to the grass layer mapped by the map level picture, that is, associate the map data representing the grass for each target pixel unit, thereby generating a map level information file for describing the information of the grass layer.

[0040] Furthermore, the user can continue to import another map level picture into the terminal, and configure the map level picture to map the sea layer of the map. Then, the terminal can associate the map data of the sea layer for each target pixel unit of the map level picture according to the sea layer mapped by the map level picture, that is, associate the map data representing the sea for each target pixel unit, thereby generating a map level information file for describing the information of the sea layer. By importing map level pictures one by one or importing multiple map level pictures at a time, and configuring the mapping relationship between each imported map level picture and the map business layer, the terminal can quickly generate a map level information file for describing the information of each map business layer according to the imported map level picture and the map business layer mapped by the map level picture.

[0041] Furthermore, by integrating the map level information files of each region, a map information file for describing the information of the entire virtual map can be quickly obtained.

[0042] The above-mentioned map level information file generation method determines the target pixel unit in the map level image by parsing the map level image, and associates the map data of the map business layer corresponding to the map level image for each target pixel unit, thereby converting the map level image into a map level information file for describing the data information of the virtual map business layer. With this method, the user no longer needs to manually edit the map data of each business layer of the virtual map by referring to the map level image, but can quickly and efficiently convert the map level image into a map level information file for describing the data information of the virtual map business layer by importing the map level image, thereby improving the development efficiency of the virtual map.

[0043] In one embodiment, determining the target pixel unit according to the pixel information of each pixel unit includes: determining the pixel unit whose pixel information matches the preset information as the target pixel unit.

[0044] In this embodiment, preset information for determining the target pixel unit can be pre-set. After the terminal parses and obtains the pixel information of each pixel unit, the terminal can compare the parsed pixel information with the preset information. When the pixel information matches the preset information, the pixel unit whose pixel information matches the preset information is determined as the target pixel unit.

[0045] Exemplarily, the terminal obtains the pixel value of each pixel unit by performing image analysis on the map-level image. For a binary image, the pixel value of each pixel unit is either "0" or "1". If the preset information is "1", then the terminal can determine whether the pixel value of each pixel unit matches the preset information, that is, determine whether the pixel value of each pixel unit is "1". If so, the pixel unit with a pixel value of "1" can be determined as the target pixel unit. Of course, the pixel value "0" can also be set as the preset information as needed, and it can be determined whether the pixel value of each pixel unit is "0", thereby determining the pixel unit with a pixel value of "0" as the target pixel unit, and so on.

[0046] In one embodiment, a pixel unit includes multiple pixel points, and parsing the pixel information of each pixel unit in the map level image includes: obtaining the pixel information of each pixel point in the pixel unit; counting the number of pixel points carrying different pixel information in the pixel unit respectively; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.

[0047] In this embodiment, the terminal can parse the pixel information of each pixel point in the pixel unit respectively. If the pixel information of the pixel points contained in the pixel unit is not exactly the same, the number of pixel points corresponding to the different pixel information can be counted, and the pixel information of the pixel point with the largest number can be used as the pixel information of the pixel unit.

[0048] Exemplarily, if the map layer image is a binary image, a pixel unit contains 9 pixels, the number of pixels with a pixel value of "1" is 5, and the number of pixels with a pixel value of "0" is 4, then the pixel information of the pixel points with a pixel value of "1" is the pixel information of the pixel unit, that is, the pixel value of the pixel unit is "1".

[0049] Exemplarily, if the map level image is a color image, a pixel unit contains 9 pixels and three different pixel color values, there is 1 pixel with a pixel color value of RGB = (0, 0, 255), there are 2 pixels with a pixel color value of RGB = (0, 255, 0), and there are 6 pixels with a pixel color value of RGB = (255, 0, 0), then RGB = (255, 0, 0) is used as the pixel color value of the pixel unit.

[0050] In one embodiment, if there are the same number of pixel points with different pixel information in a pixel unit, the priority of the pixel information can be customized according to business needs, and the pixel information with a higher priority is used as the pixel information of the pixel unit. For example, for a binary image, if the number of pixel points with a pixel value of "1" and the number of pixel points with a pixel value of "0" in a pixel unit are the same, the priority of "1" can be preset to be greater than "0". When this happens, the pixel value of "1" is used as the pixel information of the pixel unit.

[0051] In one embodiment, reference Figure 3 As shown, Figure 3 The flowchart of the steps of generating a map layer information file of a target map service layer in one embodiment is shown in FIG. Specifically, associating the map data of the target map service layer for each target pixel unit to generate the map layer information file of the target map service layer may include the following steps:

[0052] Step S302: Generate a two-dimensional array to be assigned values ​​according to the size information of the map layer image and the size information of each pixel unit.

[0053] Step S304: Determine the coordinate information of each target pixel unit in the map level image.

[0054] Step S306: Determine the target element corresponding to each target pixel unit in the two-dimensional array to be assigned a value.

[0055] Step S308: using each coordinate information as the index value of each target element, using the map data of the target map business layer as the value of each target element, assigning values ​​to the two-dimensional array to be assigned, and obtaining an assigned two-dimensional array.

[0056] Step S310: Generate a map level information file of the target map business layer according to the assigned two-dimensional array.

[0057] In this embodiment, the terminal can determine the number of rows and columns and the number of elements of the two-dimensional array to be assigned that needs to be generated according to the size of the map level image and the size of each pixel unit set, and each pixel unit corresponds to an element in the two-dimensional array to be assigned. The terminal can determine the coordinate information of each target pixel unit according to the position information of each target pixel unit in the map level image, and determine the target element corresponding to each target pixel unit in the two-dimensional array to be assigned according to the position information of each target pixel unit in the map level image, use the coordinate information of each target pixel unit as the index value of each target element in the two-dimensional array to be assigned, use the map data of the target map business layer as the value corresponding to each target element, assign the two-dimensional array to be assigned, and obtain the assigned two-dimensional array after assignment.

[0058] Furthermore, the terminal may convert the generated assigned two-dimensional array into a byte array, store the level information representing the target map business layer in the first position of the byte array, and generate a map level information file that can be read by the rendering engine based on the byte array.

[0059] For example, assuming that the size of the map-level image is 100*100 and the size of the pixel unit is 1*1, the generated two-dimensional array a is an array of 100*100. The coordinate information of the target pixel unit of the map-level image is represented by (x, y), and the index value of each target element in the array can be represented by a[x][y], where the value range of x and y is determined according to the position of each target pixel unit in the map-level image, and the value of the index value a[x][y] is the map data of the target map business layer.

[0060] In one embodiment, the method further includes: displaying the assigned two-dimensional array in a display interface; and in response to a modification operation on the value of any element in the assigned two-dimensional array, updating the value of the element corresponding to the modification operation.

[0061] In this embodiment, the terminal can also display the generated assigned two-dimensional array in the display interface for the user to view. Each element in the assigned two-dimensional array corresponds to each pixel unit in the map level image. The user can edit and modify the value of any element in the assigned two-dimensional array through the display interface, and the terminal updates the value of the modified element in response to the user's modification operation. Among them, the modification operation may include operations such as adding data, deleting data, or changing data.

[0062] In this embodiment, when parsing the pixel information of the map-level image to associate with the map data, the target pixel unit may be judged inaccurately. Therefore, a small number of pixel units may be associated with the map data but are not, or should not be associated with the map data but are. In this embodiment, it is supported to display the assigned two-dimensional array on the display interface, and the user is supported to view and modify the value of any element in the assigned two-dimensional array, so that the map data can be finely edited and adjusted, and the accuracy of the information in the map-level information file is improved.

[0063] In one embodiment, the method further includes: acquiring a new map layer image in response to a replacement instruction for the target map service layer; and generating a map layer information file of the target map service layer according to the new map layer image.

[0064] In this embodiment, when the user wants to modify the map data of the target map business layer over a larger area, a replacement instruction for the target map business layer can also be triggered. The terminal responds to the replacement instruction, receives a new map level picture imported for the target map business layer, parses the pixel information of each pixel unit in the new map level picture, determines the target pixel unit based on the pixel information of each pixel unit, and associates the map data of the target map business layer with each target pixel unit, thereby converting the new map level picture into a map level information file of the target map business layer.

[0065] Through this embodiment, any map business layer can be quickly modified. There is no need to modify the map data in the map business layer one by one. Only the map layer image needs to be replaced to achieve comprehensive adjustment of the map data of the entire map business layer, thereby improving the efficiency of map data modification.

[0066] In one embodiment, the method further includes: generating a virtual map service layer by rendering according to the map layer information file.

[0067] In this embodiment, the terminal can also import the generated map level information file into the rendering engine, so that the rendering engine generates a grid unit of a business layer of the virtual map according to each pixel unit in the map level information file, and renders the content of each target grid unit according to the map data of the target map business layer associated with each target pixel unit, thereby generating a virtual map business layer corresponding to the information represented by the map level image. For example, if each target pixel unit is associated with the map data of the grassland layer, the rendering engine is used to render the grassland effect in the target grid unit corresponding to each target pixel unit according to the map data representing the grassland, thereby obtaining a virtual map grassland layer.

[0068] Furthermore, the method of this embodiment may also include the following steps: in response to a trigger operation at any position in the business layer of the virtual map, determining the pixel unit to be edited corresponding to the trigger operation; in response to a modification operation on the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.

[0069] In this implementation, the terminal can also support modification operations on map data of the virtual map business layer generated by rendering the map level information file. Through the rendered virtual map business layer, the user can more directly and clearly determine which map data may have errors. Therefore, this embodiment can further improve the efficiency of fine-grained modification of map data.

[0070] For example, reference Figure 4 As shown, Figure 4 This is a schematic diagram of modifying map data in a virtual map service layer in an embodiment. A user can perform a trigger operation at any position in the virtual map service layer 400 through a mouse, keyboard, finger, etc. The terminal determines the pixel unit corresponding to the position according to the trigger operation, and uses it as the pixel unit 401 to be edited. The user can modify the map data corresponding to the pixel unit 401 to be edited, and the terminal receives the modified new map data, and updates the map data corresponding to the pixel unit to be edited to the new map data re-modified by the user.

[0071] In one embodiment, the terminal may also send the generated map level information file to the server in response to the data upload instruction, so that the server performs data collaborative processing or data integration processing according to the map level information files received from different terminals.

[0072] In this embodiment, by synchronizing the map level information file to the server, the server can timely interpret the map data in the file and store it in the database to provide data support for other business development. In addition, the server can also receive the map level information files sent by different terminals to perform data integration processing or data collaborative processing, thereby achieving the purpose of developing virtual maps with multiple terminals.

[0073] It should be understood that although Figure 2-3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-3At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0074] In one embodiment, Figure 5 As shown, a map level information file generation device is provided, comprising: an image acquisition module 510, a pixel analysis module 520 and a file generation module 530, wherein:

[0075] The image acquisition module 510 is used to acquire map-level images.

[0076] The pixel analysis module 520 is used to analyze the pixel information of each pixel unit in the map layer image, and determine the target pixel unit according to the pixel information of each pixel unit.

[0077] The file generation module 530 is used to associate the map data of the target map business layer for each target pixel unit according to the target map business layer mapped by the map level picture, and generate a map level information file of the target map business layer.

[0078] In one embodiment, the pixel analysis module 520 determines the pixel unit whose pixel information matches the preset information as the target pixel unit.

[0079] In one embodiment, a pixel unit includes multiple pixel points, and the pixel analysis module 520 obtains pixel information of each pixel point in the pixel unit; counts the number of pixel points carrying different pixel information in the pixel unit respectively; and uses the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.

[0080] In one embodiment, the file generation module 530 generates a two-dimensional array to be assigned based on the size information of the map level image and the size information of each pixel unit; determines the coordinate information of each target pixel unit in the map level image; determines the target element corresponding to each target pixel unit in the two-dimensional array to be assigned; uses each coordinate information as the index value of each target element, and uses the map data of the target map business layer as the value of each target element to assign the two-dimensional array to obtain an assigned two-dimensional array; generates a map level information file of the target map business layer based on the assigned two-dimensional array.

[0081] In one embodiment, the device also includes a data modification module 540, which is used to display the assigned two-dimensional array in a display interface; in response to a modification operation on the numerical value of any element in the assigned two-dimensional array, the numerical value of the element corresponding to the modification operation is updated.

[0082] In one embodiment, the data modification module 540 is further used to obtain a new map layer image in response to a replacement instruction for the target map service layer; and generate a map layer information file of the target map service layer according to the new map layer image.

[0083] In one embodiment, the data modification module 540 is also used to render and generate a virtual map business layer based on the map layer information file; in response to a trigger operation at any position in the virtual map business layer, determine the pixel unit to be edited corresponding to the trigger operation; in response to a modification operation of the map data associated with the pixel unit to be edited, update the map data corresponding to the pixel unit to be edited.

[0084] The specific definition of the map level information file generation device can be found in the definition of the map level information file generation method above, which will not be repeated here. Each module in the above-mentioned map level information file generation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0085] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating a map level information file is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0086] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0087] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: obtaining a map level image; parsing pixel information of each pixel unit in the map level image, and determining a target pixel unit according to the pixel information of each pixel unit; and associating map data of a target map business layer for each target pixel unit according to a target map business layer mapped by the map level image, and generating a map level information file of the target map business layer.

[0088] In one embodiment, when the processor executes the computer program to determine the target pixel unit according to the pixel information of each pixel unit, the following steps are specifically implemented: a pixel unit whose pixel information matches the preset information is determined as the target pixel unit.

[0089] In one embodiment, when the processor executes a computer program to parse the pixel information of each pixel unit in a map-level image, the following steps are specifically implemented: obtaining the pixel information of each pixel point in the pixel unit; counting the number of pixel points carrying different pixel information in the pixel unit respectively; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.

[0090] In one embodiment, when a processor executes a computer program to associate each target pixel unit with the map data of a target map business layer and generates a map level information file of the target map business layer, the following steps are specifically implemented: generating a two-dimensional array to be assigned based on the size information of the map level picture and the size information of each pixel unit; determining the coordinate information of each target pixel unit in the map level picture; determining the target element corresponding to each target pixel unit in the two-dimensional array to be assigned; using each coordinate information as the index value of each target element and the map data of the target map business layer as the value of each target element, assigning the two-dimensional array to be assigned to obtain an assigned two-dimensional array; and generating a map level information file of the target map business layer based on the assigned two-dimensional array.

[0091] In one embodiment, when the processor executes the computer program, it also implements the following steps: displaying the assigned two-dimensional array in a display interface; in response to a modification operation on the value of any element in the assigned two-dimensional array, updating the value of the element corresponding to the modification operation.

[0092] In one embodiment, when executing the computer program, the processor further implements the following steps: in response to a replacement instruction for the target map service layer, obtaining a new map layer image; and generating a map layer information file of the target map service layer according to the new map layer image.

[0093] In one embodiment, when the processor executes the computer program, the following steps are also implemented: rendering and generating a virtual map business layer according to the map layer information file; in response to a trigger operation at any position in the virtual map business layer, determining the pixel unit to be edited corresponding to the trigger operation; in response to a modification operation of the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.

[0094] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a map level image; parsing pixel information of each pixel unit in the map level image, and determining a target pixel unit based on the pixel information of each pixel unit; and associating map data of the target map business layer for each target pixel unit based on the target map business layer mapped by the map level image, and generating a map level information file of the target map business layer.

[0095] In one embodiment, when the computer program is executed by a processor to determine the target pixel unit according to the pixel information of each pixel unit, the following steps are specifically implemented: a pixel unit whose pixel information matches the preset information is determined as the target pixel unit.

[0096] In one embodiment, when a computer program is executed by a processor to parse pixel information of each pixel unit in a map-level image, the following steps are specifically implemented: obtaining pixel information of each pixel point in the pixel unit; counting the number of pixel points carrying different pixel information in the pixel unit; and taking the pixel information of the pixel point with the largest number as the pixel information of the pixel unit.

[0097] In one embodiment, the computer program is executed by a processor to associate each target pixel unit with the map data of the target map business layer. When generating a map level information file of the target map business layer, the following steps are specifically implemented: generating a two-dimensional array to be assigned based on the size information of the map level picture and the size information of each pixel unit; determining the coordinate information of each target pixel unit in the map level picture; determining the target element corresponding to each target pixel unit in the two-dimensional array to be assigned; using each coordinate information as the index value of each target element and the map data of the target map business layer as the value of each target element, assigning the two-dimensional array to be assigned to obtain an assigned two-dimensional array; generating a map level information file of the target map business layer based on the assigned two-dimensional array.

[0098] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: displaying the assigned two-dimensional array in a display interface; in response to a modification operation on the value of any element in the assigned two-dimensional array, updating the value of the element corresponding to the modification operation.

[0099] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to a replacement instruction for the target map service layer, a new map layer image is acquired; and a map layer information file of the target map service layer is generated according to the new map layer image.

[0100] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: rendering and generating a virtual map business layer according to the map layer information file; in response to a trigger operation at any position in the virtual map business layer, determining the pixel unit to be edited corresponding to the trigger operation; in response to a modification operation of the map data associated with the pixel unit to be edited, updating the map data corresponding to the pixel unit to be edited.

[0101] Those skilled in the art can understand that all or part of the processes in the methods for implementing the above embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0102] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0103] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for generating a map level information file, the method comprising: Get the map layer image; Analyze the pixel information of each pixel unit in the map level image, and determine the target pixel unit according to the pixel information of each pixel unit; Determine the target map service layer mapped by the map level picture, generate a two-dimensional array to be assigned according to the size information of the map level picture and the size information of each pixel unit; determine the coordinate information of each target pixel unit in the map level picture; determine the target element corresponding to each target pixel unit in the two-dimensional array to be assigned; use each coordinate information as the index value of each target element, use the map data of the target map service layer as the value of each target element, assign the two-dimensional array to be assigned, and obtain an assigned two-dimensional array; generate a map level information file of the target map service layer according to the assigned two-dimensional array; The map data refers to data reflecting geographic characteristic information in a virtual map, and the map layer information file refers to a computer-readable file for describing map data information of a map service layer of a virtual map.

2. The method according to claim 1, characterized in that: The step of determining the target pixel unit according to the pixel information of each pixel unit comprises: A pixel unit whose pixel information matches the preset information is determined as the target pixel unit.

3. The method according to claim 1, characterized in that A pixel unit includes multiple pixel points, and the parsing of the pixel information of each pixel unit in the map level image includes: Obtaining pixel information of each pixel in the pixel unit; Counting the number of pixel points carrying different pixel information in the pixel unit respectively; The pixel information of the largest number of pixels is used as the pixel information of the pixel unit.

4. The method according to claim 1, characterized in that: The method further comprises: Displaying the assigned two-dimensional array in a display interface; In response to a modification operation on the value of any element in the assigned two-dimensional array, the value of the element corresponding to the modification operation is updated.

5. The method according to claim 1, characterized in that The method further comprises: In response to a replacement instruction for the target map service layer, acquiring a new map layer image; A map level information file of the target map service layer is generated according to the new map level picture.

6. The method according to claim 1, characterized in that The method further comprises: Rendering and generating a virtual map service layer according to the map layer information file; In response to a trigger operation at any position in the virtual map service layer, determining a pixel unit to be edited corresponding to the trigger operation; In response to a modification operation on the map data associated with the pixel unit to be edited, the map data corresponding to the pixel unit to be edited is updated.

7. A map level information file generation device, characterized in that: The device comprises: Image acquisition module, used to obtain map level images; A pixel analysis module, used to analyze the pixel information of each pixel unit in the map level image, and determine the target pixel unit according to the pixel information of each pixel unit; The file generation module is used to determine the target map service layer mapped by the map level picture, generate a two-dimensional array to be assigned according to the size information of the map level picture and the size information of each pixel unit; determine the coordinate information of each target pixel unit in the map level picture; determine the target element corresponding to each target pixel unit in the two-dimensional array to be assigned; use each coordinate information as the index value of each target element, use the map data of the target map service layer as the value of each target element, assign the two-dimensional array to be assigned, and obtain the assigned two-dimensional array; generate the map level information file of the target map service layer according to the assigned two-dimensional array; The map data refers to data reflecting geographic characteristic information in a virtual map, and the map layer information file refers to a computer-readable file for describing map data information of a map service layer of a virtual map.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Map data loading method and map data loading device based on GIS (geographic information system) platform

    CN104599324A

  • Real data acquisition method based on grid tile map

    CN113568994A