Method and device for realizing simultaneous access of multiple users, equipment and medium
By dividing the hierarchical data into multiple sub-regions in the GeoEast software system, combining the use of header files and permission management databases, the inefficiency and dirty reading problems of users when accessing massive hierarchical data is solved, and efficient data access and permission management are achieved.
Patent Information
- Application Number
- CN202311257595.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-03-28
AI Technical Summary
In the GeoEast software system, when users access massive hierarchical data, the reading efficiency is low, the response rate is slow, and there is dirty reading phenomenon.
By dividing the hierarchical bit data of the first area into multiple sub-regions, and storing the hierarchical bit data of each sub-region in multiple files, a header file record data storage situation is generated, and access permissions are managed using the concurrency control mechanism of the permission management database.
It improves the reading efficiency and response efficiency of layered data, reduces the occurrence of dirty reading phenomena, and expands the scale of user access.
Smart Images

Figure CN119719058A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, device and medium for realizing simultaneous access by multiple users. Background Art
[0002] GeoEast is an integrated software system for processing and interpreting super-large seismic data. With the promotion of GeoEast, GeoEast has more and more users, and GeoEast stores more and more stratigraphic data. At present, all stratigraphic data of a stratigraphic layer in any work area are stored in a stratigraphic file. Since the size range of the stratigraphic layer is consistent with the size range of the work area, the stratigraphic data stored in each stratigraphic file is massive. When users want to access the stratigraphic layer in the work area, they need to read the entire stratigraphic file. Since the stratigraphic data in the stratigraphic file is massive, the reading efficiency of the stratigraphic file is particularly low and the response rate is particularly slow. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, device and medium for realizing multi-user simultaneous access, which not only improves the reading efficiency of layer data, but also can avoid dirty reading as much as possible. The technical solution is as follows:
[0004] In one aspect, a method for implementing simultaneous access by multiple users is provided, the method comprising:
[0005] In response to the split storage operation on the first stratum in the first area, the stratigraphic data of the first stratum is divided into stratigraphic sub-data corresponding to a plurality of sub-areas, and the stratigraphic sub-data corresponding to the plurality of sub-areas are respectively stored in a plurality of first files, where different first files are used to store stratigraphic sub-data corresponding to different sub-areas;
[0006] Generate a header file corresponding to the plurality of first files, the header file is used to record the data storage conditions of the plurality of first files, the header file is used to indicate the location information of each sub-region, the region identifier and the storage location of the first file to which the layer sub-data of each sub-region belongs;
[0007] In response to the first adding operation, adding the storage path of the header file to a layer table of the authority management database of the first stratum, the layer table being used to manage the access rights of the respective sub-areas;
[0008] receiving an access operation to the first stratum, the access operation carrying first location information, the first location information being used to indicate an accessed location in the first stratum;
[0009] In response to the access operation, reading the storage path of the header file recorded in the layer table in the authority management database;
[0010] Based on the storage path of the header file, read the header file, and determine a first area identifier of a first sub-area based on the first location information and the location information and area identifiers of each sub-area indicated in the header file, where the first sub-area is a sub-area that includes the accessed location;
[0011] Determining the authority corresponding to the first region identifier in the layer table based on the first region identifier and a concurrency control mechanism of the authority management database, wherein the concurrency control mechanism is used to change the authority corresponding to the first region identifier based on a process accessing the layer sub-data of the first sub-region;
[0012] If the permission corresponding to the first region identifier allows, the storage location of the first file to which the layer sub-data of the first sub-region belongs is obtained from the header file, and the layer sub-data of the first sub-region is read based on the storage location.
[0013] On the other hand, a device for implementing multi-user simultaneous access is provided, the device comprising:
[0014] A division module, configured to divide the stratigraphic data of the first stratigraphic layer into stratigraphic sub-data corresponding to a plurality of sub-regions in response to a split storage operation on the first stratigraphic layer of the first region;
[0015] A storage module, used for storing the stratigraphic sub-data corresponding to the plurality of sub-regions in a plurality of first files respectively, wherein different first files are used for storing the stratigraphic sub-data corresponding to different sub-regions;
[0016] A generating module, used for generating a header file corresponding to the plurality of first files, wherein the header file is used for recording the data storage conditions of the plurality of first files, and the header file is used for indicating the location information of each sub-region, the region identifier and the storage location of the first file to which the layer sub-data of each sub-region belongs;
[0017] an adding module, configured to add the storage path of the header file to a layer table of a permission management database of the first stratum in response to a first adding operation, wherein the layer table is used to manage access rights of each sub-area;
[0018] A receiving module, configured to receive an access operation to the first stratum, wherein the access operation carries first location information, and the first location information is used to indicate an accessed location in the first stratum;
[0019] A reading module, configured to read the storage path of the header file recorded in the layer table in the authority management database in response to the access operation, and read the header file based on the storage path of the header file;
[0020] a determination module, configured to determine a first area identifier of a first sub-area based on the first location information and the location information and area identifiers of each sub-area indicated in the header file, wherein the first sub-area is a sub-area including the accessed location;
[0021] The determination module is further used to determine the authority corresponding to the first area identifier in the layer table based on the first area identifier and a concurrency control mechanism of the authority management database, wherein the concurrency control mechanism is used to change the authority corresponding to the first area identifier based on a process accessing the layer sub-data of the first sub-area;
[0022] The reading module is further used to obtain the storage location of the first file to which the layer sub-data of the first sub-area belongs from the header file when the permission corresponding to the first area identifier allows, and read the layer sub-data of the first sub-area based on the storage location.
[0023] In a possible implementation, the storage module is used to generate the layer point data, layer line data and layer surface data based on the layer data of the first layer; divide the layer point data, layer line data and layer surface data of the first stratum into layer point sub-data, layer line sub-data and layer surface sub-data corresponding to a plurality of sub-regions, and store the layer point sub-data, layer line sub-data and layer surface sub-data corresponding to the same sub-region in the same first file;
[0024] The header file is also used to indicate the storage positions of the layer site sub-data, layer line sub-data and layer surface sub-data of each sub-area in the first file to which they belong; the reading module is used to obtain the storage position of the layer site sub-data of the first sub-area in the first file to which it belongs from the header file when the access operation is an access operation for point data; based on the storage position, read the layer site sub-data of the first sub-area; when the access operation is an access operation for line data, obtain the storage position of the layer line sub-data of the first sub-area in the first file to which it belongs from the header file; based on the storage position, read the layer line sub-data of the first sub-area; when the access operation is an access operation for surface data, obtain the storage position of the layer surface sub-data of the first sub-area in the first file to which it belongs from the header file; based on the storage position, read the layer surface sub-data of the first sub-area.
[0025] In one possible implementation, the determination module is used to determine the permissions corresponding to the first area identifier and the data access type in the layer table based on the first area identifier, the concurrency control mechanism of the permission management database, and the data access type corresponding to the access operation, wherein the data access type is used to indicate whether the access operation is an access operation for point data, an access operation for line data, or an access operation for surface data.
[0026] In a possible implementation, the device further includes at least one of the following:
[0027] The adding module is further used to add the access record of the header file in the layer table after reading the storage path of the layer table record in the authority management database;
[0028] A modification module, configured to modify the authority corresponding to the first sub-region identifier in the layer table after reading the layer sub-data of the first sub-region based on the storage location;
[0029] The adding module is further configured to add the access record of the first sub-area in the layer table after reading the layer sub-data of the first sub-area based on the storage location.
[0030] In a possible implementation, the layer table includes a first layer table and a second layer table, the first layer table stores the storage path of the header file, the area identifier of each sub-area and the corresponding navigation identifier, the second layer table stores the authority of each sub-area and the corresponding navigation identifier, and the navigation identifier is a foreign key of the first layer table and the second layer table;
[0031] The determination module is used to determine, from the first layer table, a first navigation identifier corresponding to the first area identifier based on the first area identifier; and to determine, from the second layer table, an authority corresponding to the first navigation identifier based on the first navigation identifier.
[0032] In a possible implementation, the first layer table includes indexes corresponding to the area identifiers of the respective sub-areas; the determination module is used to search for the first area identifier in the first layer table based on the indexes corresponding to the first area identifier and the area identifiers of the respective sub-areas; and determine the first navigation identifier corresponding to the first area identifier in the first layer table.
[0033] In a possible implementation, the header file stores the region identifier of the first sub-region, the region identifier of the last sub-region, and the region identifier interval, and also stores the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of the multiple sub-regions, and also stores the horizontal coordinate difference and the vertical coordinate difference of adjacent sub-regions;
[0034] The determination module is used to determine the positional relationship between the sub-region to which the first position information belongs and the first sub-region based on the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate and the minimum vertical coordinate of the multiple sub-regions, the horizontal coordinate interval and the vertical coordinate interval of adjacent sub-regions and the first position information; and determine the first sub-region identifier of the first sub-region to which the first position information belongs based on the positional relationship, the region identifier interval, the region identifier of the first sub-region and the region identifier of the last sub-region.
[0035] In a possible implementation, the segmentation module is used to generate a vector grid including the first region based on the shape information of the first region; segment the vector grid based on a first segmentation size to obtain a plurality of tile grids, where one tile grid corresponds to one sub-region;
[0036] The storage module is used to store the layer sub-data belonging to the same tile grid in the layer data of the first area into the first file corresponding to the tile grid.
[0037] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the method for achieving simultaneous access by multiple users as described in any of the above implementations.
[0038] On the other hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the method for achieving simultaneous multi-user access as described in any of the above implementations.
[0039] On the other hand, a computer program product is provided, the computer program product comprising at least one program code, the at least one program code being loaded and executed by a processor to implement the method for achieving multi-user simultaneous access as described in any of the above implementations.
[0040] The beneficial effects of the technical solution provided by the embodiments of the present application include at least:
[0041] The embodiment of the present application provides a method for realizing multi-user simultaneous access, which divides the first area into multiple sub-areas, and stores the layer sub-data of each sub-area in different files, so that the user does not need to access all the layer data of the entire first area, and the user can only access the layer sub-data of one sub-area. Since the layer sub-data of a sub-area are relatively small, the reading efficiency of the layer data can be improved, and the response efficiency can be improved. When determining the sub-area accessed by the user, the area identifier of the sub-area is obtained through the file header and the database. Since the database is provided with a concurrent control mechanism, the area identifier is obtained through the file header and the database, and then the corresponding file is read, which can avoid multiple users from reading and writing the file at the same time, and reduce the occurrence of dirty read phenomenon. Therefore, the method for accessing layer data provided by the embodiment of the present application not only improves the reading efficiency and response efficiency of layer data, but also can avoid dirty read phenomenon as much as possible.
[0042] In addition, the stratigraphic data are separated into points, lines and surfaces. The GeoEast system is used to divert users' access operations to stratigraphic data and organize them into point, line and surface data access operations. This allows point data, line data and surface data in the same sub-area to be accessed simultaneously by different users, further improving the reading efficiency and response efficiency of stratigraphic data and expanding the scale of user access. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 is a flow chart of a method for implementing simultaneous access by multiple users provided in an embodiment of the present application;
[0045] Figure 2 is a flow chart of a method for implementing simultaneous access by multiple users provided in an embodiment of the present application;
[0046] Figure 3 is a schematic diagram of generating a vector grid for a first area provided in an embodiment of the present application;
[0047] Figure 4 is a schematic diagram of generating a vector grid for a first area provided in an embodiment of the present application;
[0048] Figure 5 is a schematic diagram of a segmented vector grid provided in an embodiment of the present application;
[0049] Figure 6is a schematic diagram of multiple cell files provided in an embodiment of the present application;
[0050] Figure 7 It is a schematic diagram of storage of layer position sub-data provided in an embodiment of the present application;
[0051] Figure 8 It is a schematic diagram of storage of layer position sub-data provided in an embodiment of the present application;
[0052] Fig. 9 This is a performance test comparison chart provided in an embodiment of the present application;
[0053] Fig.10 is a structural diagram of a device for implementing simultaneous access by multiple users provided in an embodiment of the present application;
[0054] Fig.11 is a structural diagram of a device for implementing simultaneous access by multiple users provided in an embodiment of the present application;
[0055] Fig.12 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0056] Fig.13 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0058] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0059] The layer data access method provided in the embodiment of the present application is executed by a computer device. In some embodiments, the computer device can be a terminal, and the terminal can be a mobile phone, a desktop computer, a laptop computer or other types of terminals. The embodiment of the present application does not limit the terminal. In other embodiments, the computer device includes a terminal and a server. It should be noted that the embodiment of the present application is only an exemplary description of the execution subject of the layer data access method, and does not limit the execution subject.
[0060] Figure 1 1 is a flowchart of a method for implementing simultaneous access by multiple users provided in an embodiment of the present application. The present application embodiment is exemplified by taking a computer device as an example. The computer device runs a GeoEast system. The method for implementing simultaneous access by multiple users is applied to the GeoEast system. Figure 1 , the method comprising:
[0061] 101. In response to the split storage operation on the first stratum in the first area, the computer device divides the stratigraphic data of the first stratum into stratigraphic sub-data corresponding to multiple sub-areas, and stores the stratigraphic sub-data corresponding to the multiple sub-areas in multiple first files, respectively. Different first files are used to store the stratigraphic sub-data corresponding to different sub-areas.
[0062] The first area can be any area, and the first area can be a real geographical area or a virtual geographical area, and the first area is not limited in the embodiment of the present application. In some embodiments, the first area is any work area for energy extraction.
[0063] There are multiple strata deposited in the first area, and the first stratum can be any stratum in the first area. The first stratum is not limited in the embodiment of the present application. In some embodiments, the method provided in the embodiment of the present application can be performed for each stratum in the first area. The embodiment of the present application is only exemplified by taking the first stratum in the first area as an example.
[0064] The multiple sub-regions in the embodiment of the present application may be multiple sub-regions of the same size, or may be multiple sub-regions of different sizes. The embodiment of the present application does not limit the sizes of the multiple sub-regions.
[0065] In an embodiment of the present application, the stratigraphic sub-data corresponding to different sub-areas are stored in different first files, thereby isolating the stratigraphic sub-data of different sub-areas. Subsequently, when a user accesses the first stratum in the first area, he or she can access the stratigraphic sub-data corresponding to any sub-area individually without having to access the entire first area.
[0066] 102. A computer device generates a header file corresponding to a plurality of first files, wherein the header file is used to record data storage conditions of the plurality of first files, and the header file is used to indicate location information of each sub-region, region identifier, and storage location of the first file to which the layer sub-data of each sub-region belongs.
[0067] In the embodiment of the present application, the header file is used to indicate the region identification of each sub-region, the location information of each sub-region, and the storage location of the layer sub-data of each sub-region. Therefore, based on the header file, the sub-region to which the accessed position belongs can be determined, and the storage location of the layer sub-data of the sub-region can also be obtained. In other words, based on the header file, the user can access the layer sub-data of any sub-region.
[0068] 103. In response to the first adding operation, the computer device adds the storage path of the header file to a layer table of the permission management database of the first layer, where the layer table is used to manage access rights of each sub-area.
[0069] If multiple users access the layer sub-data of the same sub-area at the same time, some users may perform write access operations on the layer sub-data, resulting in dirty reads. In order to reduce the occurrence of dirty reads, the embodiment of the present application introduces a rights management database, which is provided with a concurrency control mechanism. Through this concurrency control mechanism, the user's access rights to the layer sub-data can be controlled to avoid multiple users performing write access operations on the layer sub-data in the same file at the same time. The rights management database includes a layer table, which is used to manage the access rights of each sub-area, that is, the rights management database implements a concurrency control mechanism through the layer table.
[0070] Since the layer sub-data of each sub-area is stored in multiple first files, but not in the rights management database, in order to associate the rights management database with the multiple first files, the embodiment of the present application stores the storage path of the header files of the multiple first files in the rights management database. Since each time a user accesses, it is necessary to determine the corresponding first file based on the header file, therefore, the storage path of the header file is stored in the rights management database, and each time a user accesses, it is necessary to read the header file from the rights management database, so that the rights management database can perform corresponding rights management for the access.
[0071] 104. The computer device receives an access operation to a first stratum, where the access operation carries first location information, and the first location information is used to indicate an accessed location in the first stratum.
[0072] It should be noted that the accessed location can be a point or an area, and the embodiments of the present application do not limit the accessed location. In some embodiments, the accessed location is a point, and the first location information can be the coordinates of the point. In other embodiments, the accessed location is an area, and the first location information is the area range of the area. For example, when any of the locations is a rectangular area, the first location information can be the coordinates of the four vertices of the rectangular area.
[0073] 105. In response to the access operation, the computer device reads the storage path of the header file of the layer table record in the authority management database.
[0074] It should be noted that the embodiment of the present application only takes the first stratum in the first area as an example to exemplify the method provided in the embodiment of the present application. Therefore, when the access operation is an access operation to the first stratum in the first area, the storage path of the header file corresponding to the first stratum recorded in the stratum table in the permission management database is read. When the access operation is an access operation to the second stratum in the first area, the storage path of the header file corresponding to the second stratum recorded in the stratum table in the permission management database is read. When the access operation is an access operation to the third stratum in the second area, the storage path of the header file corresponding to the third stratum recorded in the stratum table in the permission management database is read.
[0075] 106. The computer device reads the header file based on the storage path of the header file, and determines a first area identifier of a first sub-area based on the first location information and location information and area identifiers of each sub-area indicated in the header file, where the first sub-area is a sub-area that includes the accessed location.
[0076] According to the record in the above step 104, the visited position can be a point or an area. When the visited position is a point, since the point can only belong to one sub-area, the first sub-area is a sub-area. When the visited position is an area, the area can belong to only one sub-area or multiple sub-areas. When the visited area belongs to multiple sub-areas, the first sub-area is a plurality of sub-areas.
[0077] 107. The computer device determines the authority corresponding to the first area identifier in the layer table based on the first area identifier and the concurrent control mechanism of the authority management database, and the concurrent control mechanism is used to change the authority corresponding to the first area identifier based on the process accessing the layer sub-data of the first sub-area.
[0078] In some embodiments, the concurrency control mechanism changes the permissions corresponding to the first region identifier based on the process accessing the layer sub-data of the first sub-region. Wherein, when the concurrency control mechanism changes the permissions corresponding to the first region identifier based on the process accessing the layer sub-data of the first sub-region, it may be related to the type of process, or may be related to the start or end of the process. For example, when the process is a read process, the permissions corresponding to the first region identifier are read-write permissions, and when the process is a write process, the permissions corresponding to the first region identifier are read-only permissions; for another example, when the process is a read process, the permissions corresponding to the first region identifier are read-only permissions, and when the process is a write process, the permissions corresponding to the first region identifier are unreadable permissions; for another example, when the process starts, the permissions corresponding to the first region identifier are modified to read-only permissions, and when the process ends, the permissions corresponding to the first region identifier are modified to read-write permissions.
[0079] In some embodiments, the region identifiers and permissions are stored in correspondence in the layer table, and the permission corresponding to the first region identifier can be determined after the first region identifier is found in the layer table.
[0080] 108. When the permission corresponding to the first region identifier allows, the computer device obtains the storage location of the first file to which the layer sub-data of the first sub-region belongs from the header file, and reads the layer sub-data of the first sub-region based on the storage location.
[0081] The permission corresponding to the first region identifier means: the permission corresponding to the first region identifier allows the current access operation to continue to access the file of the storage layer bit sub-data. For example, when the access operation is a read access operation, the permission corresponding to the first region identifier is read-only or read-write, which is the case where the permission corresponding to the first region identifier allows; for another example, when the access operation is a write access operation, the permission corresponding to the first region identifier is read-only, which is the case where the permission corresponding to the first region identifier does not allow.
[0082] In the method for realizing multi-user simultaneous access provided by the embodiment of the present application, the first area is divided into a plurality of sub-areas, and the layer sub-data of each sub-area is stored in different files, so that the user does not need to access all the layer data of the entire first area, and the user can only access the layer sub-data of one sub-area. Since the layer sub-data of a sub-area is relatively small, the reading efficiency of the layer data can be improved, and the response efficiency can be improved. When determining the sub-area accessed by the user, the area identification of the sub-area is obtained through the file header and the database. Since the database is provided with a concurrent control mechanism, the area identification is obtained through the file header and the database, and then the corresponding file is read, which can avoid multiple users from reading and writing the file at the same time, and reduce the occurrence of dirty read phenomenon. Therefore, the method for accessing layer data provided by the embodiment of the present application not only improves the reading efficiency and response efficiency of layer data, but also can avoid dirty read phenomenon as much as possible.
[0083] In a possible implementation, dividing the stratigraphic data of the first stratigraphic layer into stratigraphic sub-data corresponding to a plurality of sub-regions, and storing the stratigraphic sub-data corresponding to the plurality of sub-regions in a plurality of first files respectively, includes:
[0084] Based on the stratigraphic data of the first stratigraphic layer, stratigraphic point data, stratigraphic line data and stratigraphic surface data are generated;
[0085] Dividing the stratigraphic point data, stratigraphic line data and stratigraphic surface data of the first stratigraphic layer into stratigraphic point sub-data, stratigraphic line sub-data and stratigraphic surface sub-data corresponding to a plurality of sub-regions, and storing the stratigraphic point sub-data, stratigraphic line sub-data and stratigraphic surface sub-data corresponding to the same sub-region in the same first file;
[0086] The header file is also used to indicate the storage location of the stratigraphic point sub-data, stratigraphic line sub-data and stratigraphic surface sub-data of each sub-region in the first file to which they belong; obtaining the storage location of the first file to which the stratigraphic sub-data of the first sub-region belongs from the header file, and reading the stratigraphic sub-data of the first sub-region based on the storage location, including:
[0087] When the access operation is an access operation of point data, the storage position of the layer site sub-data of the first sub-region in the first file to which it belongs is obtained from the header file; based on the storage position, the layer site sub-data of the first sub-region is read;
[0088] When the access operation is an access operation of line data, the storage position of the layer line sub-data of the first sub-region in the first file to which it belongs is obtained from the header file; based on the storage position, the layer line sub-data of the first sub-region is read;
[0089] When the access operation is an access operation of surface data, the storage position of the layer surface sub-data in the first sub-region in the corresponding first file is obtained from the header file; based on the storage position, the layer surface sub-data in the first sub-region is read.
[0090] In a possible implementation, based on the first area identifier and the concurrent control mechanism of the authority management database, determining the authority corresponding to the first area identifier in the layer table includes:
[0091] Based on the first area identifier, the concurrency control mechanism of the authority management database and the data access type corresponding to the access operation, the authority corresponding to the first area identifier and the data access type in the layer table is determined, wherein the data access type is used to indicate whether the access operation is an access operation for point data, an access operation for line data or an access operation for surface data.
[0092] In a possible implementation, the method further includes at least one of the following:
[0093] After reading the storage path of the layer table record in the authority management database, adding the access record of the header file in the layer table;
[0094] After reading the layer sub-data of the first sub-region based on the storage location, modifying the authority corresponding to the first sub-region identifier in the layer table;
[0095] After the layer sub-data of the first sub-region is read based on the storage location, an access record of the first sub-region is added to the layer table.
[0096] In a possible implementation, the layer table includes a first layer table and a second layer table, the first layer table stores the storage path of the header file, the area identifier of each sub-area and the corresponding navigation identifier, the second layer table stores the authority of each sub-area and the corresponding navigation identifier, and the navigation identifier is a foreign key between the first layer table and the second layer table;
[0097] Based on the first area identifier and the concurrent control mechanism of the authority management database, the authority corresponding to the first sub-area in the layer table is determined, including:
[0098] Based on the first area identifier, determining a first navigation identifier corresponding to the first area identifier from the first layer table;
[0099] Based on the first navigation identifier, the authority corresponding to the first navigation identifier is determined from the second layer table.
[0100] In a possible implementation, the first layer table includes indexes corresponding to the area identifiers of each sub-area; and based on the first area identifier, determining the first navigation identifier corresponding to the first area identifier from the first layer table includes:
[0101] Based on the first region identifier and the indexes corresponding to the region identifiers of each sub-region, searching for the first region identifier in the first layer bit table;
[0102] A first navigation identifier corresponding to the first area identifier in the first layer table is determined.
[0103] In a possible implementation, the header file stores the region identifier of the first sub-region, the region identifier of the last sub-region, and the region identifier interval, and also stores the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate in the multiple sub-regions, and also stores the horizontal coordinate difference and the vertical coordinate difference of adjacent sub-regions;
[0104] Determining a first region identifier of a first subregion based on the first position information and the position information and region identifiers of each subregion indicated by the header file includes:
[0105] Determine a positional relationship between the subregion to which the first position information belongs and the first subregion based on maximum abscissas, minimum abscissas, maximum ordinates and minimum ordinates of the plurality of subregions, abscissa intervals and ordinate intervals of adjacent subregions and the first position information;
[0106] Based on the position relationship, the area identifier interval, the area identifier of the first sub-area, and the area identifier of the last sub-area, a first sub-area identifier of the first sub-area to which the first position information belongs is determined.
[0107] In a possible implementation, dividing the stratigraphic data of the first stratigraphic layer into stratigraphic sub-data corresponding to a plurality of sub-regions, and storing the stratigraphic sub-data corresponding to the plurality of sub-regions in a plurality of first files respectively, includes:
[0108] Based on the shape information of the first area, generating a vector grid including the first area;
[0109] Based on the first segmentation size, the vector grid is segmented to obtain a plurality of tile grids, where one tile grid corresponds to one sub-region;
[0110] The layer sub-data belonging to the same tile grid in the layer data of the first region are stored in a first file corresponding to the tile grid.
[0111] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0112] Figure 2 1 is a flowchart of a method for implementing simultaneous access by multiple users provided in an embodiment of the present application. The present application embodiment is exemplified by taking a computer device as an example. The computer device runs a GeoEast system. The method for implementing simultaneous access by multiple users is applied to the GeoEast system. Figure 2 , the method comprising:
[0113] 201. A computer device generates a vector grid including a first area based on shape information of the first area.
[0114] The first area may be any area, and the present application embodiment does not limit the first area. In some embodiments, the vector grid of the first area is the smallest rectangular grid that includes the first area. Figure 3 As shown, the first area is an irregular area, and the vector grid is a rectangular grid containing the first area.
[0115] In an embodiment of the present application, the computer device can determine the coordinates of the four inflection points of the vector mesh based on the shape information of the first area, that is, the coordinates of the four vertices of the vector mesh. In some embodiments, the computer device connects the four vertices in sequence to obtain a vector mesh. In other embodiments, the computer device generates a (cmp, line) value based on the coordinates of the four vertices; and generates the vector mesh of the first area based on the (cmp, line) value. In other embodiments, the computer device generates a (cmp, line) value based on the coordinates of the four vertices; determines the rotation angle of the inflection point based on the coordinates of any two adjacent vertices among the coordinates of the four vertices; and generates the vector mesh of the first area based on the (cmp, line) value and the rotation angle, such as Figure 4 As shown. Among them, cmp and line are the marks of the lines in the grid, wherein cmp is the mark of the horizontal line, and line is the mark of the vertical line. cmp and line can be any natural numbers.
[0116] For example, the coordinates of the first vertex are (x1, y1), and the coordinates of the second vertex are (x2, y2). The rotation angle can be expressed as Wherein, arc tan is an inverse tangent function. When generating a vector grid of the first region based on the (cmp, line) value and the rotation angle, the horizontal direction of the grid may be marked as 0 to cmp, and the vertical direction of the grid may be marked as 0 to line.
[0117] 202. The computer device segments the vector grid based on the first segmentation size to obtain a plurality of tile grids, where one tile grid corresponds to one sub-region.
[0118] The first segmentation size may be any size, and the embodiment of the present application does not limit the size of the first segmentation size. In some embodiments, the first segmentation size is a preset segmentation size. In other embodiments, the first segmentation size is a segmentation size set by a user, and the embodiment of the present application does not limit the source of the first segmentation size.
[0119] In some embodiments, the minimum horizontal division unit of the vector grid is set to n, and the minimum vertical division unit of the vector grid is set to m. Where n and m are any natural real numbers. Figure 5 As shown, a vector grid (horizon_grid) is created, and the (cmp, line) value of the vector grid is (8, 8). Taking n=1 and m=1 as an example, the vector grid is segmented, and the rotation angle is the rotation angle of the vector grid, 64 tile grids are obtained, and the 64 tile grids are numbered.
[0120] It should be noted that, in the embodiment of the present application, after the vector grid is segmented to obtain multiple tile grids, each tile grid can also be numbered and the number can be used as the grid identifier of the tile grid. The number can also be used as the area identifier of the sub-area represented by the tile grid. The number can also be used as the identifier of the layer sub-data of the sub-area represented by the tile grid. The embodiment of the present application does not limit this.
[0121] The method provided in the embodiment of the present application is applied to the GeoEast system, which is a software system for super-large seismic data processing and interpretation. In the GeoEast system, the stratigraphic data of any work area can be viewed, and the work area is usually irregular and at any angle. Therefore, the embodiment of the present application uses the tile separation technology shown in steps 201 to 203 to segment the strata in the GeoEast system, so that different users can access different areas of the same stratum at the same time, thereby improving access efficiency.
[0122] 203. The computer device adds the layer sub-data belonging to the same tile grid in the layer data of the first region to the first file corresponding to the tile grid.
[0123] Any tile grid is used to represent a sub-region, so the layer data of the first region can be similarly segmented to obtain the layer sub-data corresponding to each sub-region. In some embodiments, the computer device determines the horizontal value range (hx0, hx1) and the vertical value range (hy0, hy1) of the layer data of the first region; determines the number of horizontal segmentations and the number of vertical segmentations; determines the second segmentation size based on the horizontal value range, the vertical value range, the number of horizontal segmentations and the number of vertical segmentations, and segments the layer data of the first region into multiple layer sub-data based on the second segmentation size, and one layer sub-data corresponds to a sub-region corresponding to a tile grid. Among them, hx0 is the minimum horizontal coordinate of the first region, hx1 is the minimum vertical coordinate of the first region, hy0 is the minimum vertical coordinate of the first region, and hy1 is the maximum vertical coordinate of the first region.
[0124] The number of horizontal divisions and the number of vertical divisions are determined by the number of tile grids in the horizontal direction and the number of tile grids in the vertical direction. The number of horizontal divisions can be expressed as Vcmp = (cmp-0) / n, and the number of vertical divisions can be expressed as Vline = (line-0) / m. The second division size can be expressed as (fx, fy), where: fx = (hx1-hx0) / Vcmp; fy = (hy1-hy0) / Vline.
[0125] In the GeoEast system, multiple users usually read and write the stratigraphic data of a project at the same time, and have high requirements for the scale of concurrent access to stratigraphic data and the efficiency of data reading and writing. Since each user reads and writes stratigraphic data, including full coverage, arbitrary positions, arbitrary lines, and arbitrary areas, the data reading is too intensive and the data volume is too large, so the embodiment of the present application proposes to separate the stratigraphic data into points, lines, and surfaces.
[0126] In one possible implementation, a computer device adds layer sub-data belonging to the same tile grid in the layer data of the first area to a first file corresponding to the tile grid, including: generating layer point data, layer line data and layer plane data based on the layer data of the first layer; adding the layer point sub-data, layer plane sub-data and layer line sub-data belonging to the same tile grid in the layer point number, layer line data and layer plane data of the first layer to the first file corresponding to the tile grid.
[0127] Among them, the layer site data can be expressed as in, Among them, X is the horizontal coordinate of the point, and Y is the vertical coordinate of the point. Represents the coordinates of the i-th point.
[0128] The layer line data can be expressed as in, It is used to represent the line segment composed of the i-th point and the i-1-th point. The layer surface data can be expressed as in, Used to represent the surface composed of the i-2th point, the i-1th point and the i-th point.
[0129] It should be noted that the embodiment of the present application only uses the tile separation technology as an example to exemplify the process of storing the stratigraphic data in the first file. In other embodiments, the computer device can use any division method to divide the stratigraphic point data, stratigraphic line data, and stratigraphic surface data of the first stratigraphic layer into stratigraphic point sub-data, stratigraphic line sub-data, and stratigraphic surface sub-data corresponding to multiple sub-regions, and store the stratigraphic point sub-data, stratigraphic line sub-data, and stratigraphic surface sub-data corresponding to the same sub-region in the same first file. In the first file, the stratigraphic point sub-data are together, the stratigraphic line sub-data are together, and the stratigraphic surface sub-data are together.
[0130] 204. The computer device generates a header file based on the layer position sub-data stored in the first file corresponding to the plurality of tile grids.
[0131] In some embodiments, some sub-regions have layer sub-data, and some sub-regions do not have layer sub-data, such as Figure 6As shown, correspondingly, some cell files (files corresponding to tile grids) are empty value files, and some cell files are real value files. In addition, the layer sub-data includes at least one of the layer point sub-data, layer line sub-data and layer surface sub-data. Therefore, in order to more accurately and quickly determine the characteristics of the layer sub-data stored in the file, a header file can also be generated to describe the characteristics, storage conditions, etc. of the layer sub-data of each sub-region. In some embodiments, the method further includes: generating a header file based on the layer sub-data stored in the files corresponding to multiple tile grids. Optionally, the header file is used to indicate the area identification of each sub-region, the location information of each sub-region and the storage location of the layer sub-data of each sub-region. Optionally, the header file is also used to indicate the storage location of the layer point sub-data, layer line sub-data and layer surface sub-data of each sub-region in the first file to which they belong.
[0132] In some embodiments, the header file stores the region identification of each sub-region, the location information of each sub-region, and the storage location of the layer sub-data of each sub-region. In other embodiments, in order to reduce the information stored in the header file so that the desired information can be extracted from the header file more quickly during subsequent use, the region identification of each sub-region is no longer stored in the header file, but the first region identification, the last region identification, and the region identification interval are stored in the header file. For example, the first region identification is 1, the last region identification is 100, and the region identification interval is 1, then the second region identification is 2, the third region identification is 3, and the fourth region identification is 4. When the determined region identification exceeds 100, it means that the region identification is wrong. For another example, the first region identification is 0, the last region identification is 100, and the region identification interval is 5, then the second region identification is 5, the third region identification is 10, and the fourth region identification is 15, etc.
[0133] Similarly, the position information of each sub-region is no longer stored in the header file, but the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, the minimum vertical coordinate, and the horizontal coordinate difference and the vertical coordinate difference of the adjacent sub-regions in the multiple sub-regions are stored in the header file. The position information of each sub-region can be calculated according to the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, the minimum vertical coordinate, and the horizontal coordinate difference and the vertical coordinate difference of the adjacent sub-regions.
[0134] In some embodiments, the header file further includes at least one of the following: coordinate dimension, null value information, and data type. The null value information is used to indicate whether the file is a null value file or a file storing layer sub-data, and the data type is used to indicate whether the file stores layer point sub-data, layer line sub-data, layer surface sub-data, or a combination of multiple layers of layer point sub-data, layer line sub-data, and layer surface sub-data.
[0135] 205. The computer device creates a layer table in the database in response to the table creation operation.
[0136] The embodiment of the present application introduces a database to avoid the occurrence of dirty reads. Since the database is provided with a concurrency control mechanism, the concurrency control mechanism of the database can be used to avoid the occurrence of dirty reads. In some embodiments, the storage path of the header file is stored in the layer table. In this way, when the header file is read subsequently, the storage path of the header file needs to be read from the database first. In this way, the database knows that a user has accessed the header file and accessed the layer sub-data based on the header file. Therefore, the user's access can be managed with the help of the concurrency control mechanism.
[0137] In some embodiments, the layer table includes a first layer table and a second layer table. The first layer table stores the storage path of the header file, the area identifier of each sub-area and the corresponding navigation identifier. The second layer table stores the authority of each sub-area and the corresponding navigation identifier. The navigation identifier is a foreign key of the first layer table and the second layer table.
[0138] Since the first-layer table and the second-layer table have the same foreign key, it means that the first-layer table and the second-layer table are two related tables, and the corresponding permissions can be quickly determined from the second-layer table based on the area identifier in the first-layer table.
[0139] In some embodiments, the layer table of the database stores not only the relevant information of the first area, but also the relevant information of the second area, the relevant information of the third area, etc. Therefore, the first layer table may also record the storage path of the header file corresponding to each area, the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate and the minimum vertical coordinate of each area. After obtaining the first position information in the access operation, it can be determined whether the first position information belongs to the first area, the second area or the third area, so as to obtain the storage path of the header file of the area.
[0140] In some embodiments, the first layer bitmap is also used to record the records of users accessing the header file, and the second layer bitmap is also used to record the access records of users accessing the sub-area, that is, the access records of users accessing the cell file.
[0141] 206. The computer device establishes a communication connection with the database in response to the connection establishment operation.
[0142] The connection establishment operation is an operation for connecting to a database. In some embodiments, a computer device establishes a communication connection with a database through a command line. Optionally, the connection establishment operation is an input operation of a command line. In other embodiments, a computer device establishes a communication connection with a database through a tool. The embodiment of the present application does not limit the tool used by the computer device. For example, the tool is HeidiSQL, and the connection establishment operation is an operation of a user in the tool. In other embodiments, a computer device opens a database connection handle and creates a communication connection with a database. The connection establishment operation is an operation of opening the handle. The embodiment of the present application does not limit the connection establishment operation.
[0143] In some embodiments, before connecting to the database, the user needs to set the IP (Internet Protocol) address, port number, user name, password, etc. The computer device establishes a communication connection with the database based on the IP address, port number, user name, password, etc. set by the user.
[0144] 207. The computer device receives an access operation of the first layer, the access operation carrying the first location information, and in response to the access operation, reads a storage path of a header file recorded in the layer table in the authority management database.
[0145] In some embodiments, the computer device displays the first area, and the user can trigger an access operation to the layer data of any position in the first area in the first area. Of course, the computer device can also provide other ways for the user to trigger the access operation, which is not limited in the embodiments of the present application.
[0146] In some embodiments, the layer table includes a first layer table and a second layer table, and the first layer table stores a storage path of a header file. In response to an access operation, the computer device reads the storage path recorded in the layer table in the database, including: the computer device reads the storage path recorded in the first layer table in the database in response to the access operation. In some embodiments, the first layer table records the storage paths of header files corresponding to multiple regions, and also records the maximum horizontal coordinates, minimum horizontal coordinates, maximum vertical coordinates, and minimum vertical coordinates of multiple regions. In response to the access operation, the computer device reads the storage path recorded in the layer table in the database, including: the computer device determines the region to which the position indicated by the first position information belongs based on the first position information and the maximum horizontal coordinates, minimum horizontal coordinates, maximum vertical coordinates, and minimum vertical coordinates of multiple regions recorded in the first layer table in response to the access operation, and reads the storage path of the header file corresponding to the region.
[0147] 208. The computer device determines a first region identifier of a first subregion based on the first location information and the region identifiers and location information of each subregion indicated by the header file, where the first subregion is a subregion including the accessed location.
[0148] In some embodiments, after the computer device obtains the storage path, it obtains a handle for accessing the header file from the storage path, opens the header file based on the handle, and executes the above step 208.
[0149] In some embodiments, the header file stores the region identification and location information of each sub-region, and the computer device can directly determine the sub-region to which the first location information belongs based on the first location information and the location information of each sub-region, and obtain the region identification of the sub-region.
[0150] In some other embodiments, the header file stores the region identification of the first sub-region, the region identification of the last sub-region, and the region identification interval, and also stores the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of multiple sub-regions. The maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of the multiple sub-regions are the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of the vector grid of the first region. The computer device determines the first region identification of the first sub-region based on the first position information and the region identification and position information of each sub-region indicated by the header file, including: determining the positional relationship between the sub-region to which the first position information belongs and the first sub-region based on the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of the multiple sub-regions, the horizontal coordinate interval and the vertical coordinate interval of the adjacent sub-regions, and the first position information; determining the first region identification of the first sub-region to which the first position information belongs based on the positional relationship, the region identification interval, the region identification of the first sub-region, and the region identification of the last sub-region.
[0151] For example, based on the maximum horizontal coordinate, minimum horizontal coordinate, maximum vertical coordinate and minimum vertical coordinate of multiple sub-regions, the horizontal coordinate interval and vertical coordinate interval of adjacent sub-regions, and the first position information, it is determined that the sub-region to which the first position information belongs is the third sub-region to the right of the first sub-region, the region identifier of the first sub-region is 0, and the region identifier interval is 3, then the region identifier of the sub-region to which the first position information belongs is 3.
[0152] 209. The computer device determines the authority corresponding to the first area identifier in the layer table based on the first area identifier and a concurrent control mechanism of the database, where the concurrent control mechanism is used to change the authority corresponding to the first area identifier based on a process accessing the layer sub-data of the first sub-area.
[0153] In some embodiments, the user's access operations are divided into point, line, and surface data access operations through the GeoEast system. The computer device determines the authority corresponding to the first area identifier in the layer table based on the first area identifier and the concurrent control mechanism of the authority management database, including: based on the first area identifier, the concurrent control mechanism of the authority management database, and the data access type corresponding to the access operation, determining the authority corresponding to the first area identifier and the data access type in the layer table, wherein the data access type is used to indicate whether the access operation is an access operation for point data, an access operation for line data, or an access operation for surface data.
[0154] In some embodiments, the layer table includes a first layer table and a second layer table, the first layer table stores the storage path of the header file, the region identifier of each sub-region and the corresponding navigation identifier, the second layer table stores the authority of each sub-region and the corresponding navigation identifier, and the navigation identifier is a foreign key of the first layer table and the second layer table. The computer device determines the authority corresponding to the first sub-region in the layer table based on the first region identifier and the concurrent control mechanism of the database, including: based on the first region identifier, determining the first navigation identifier corresponding to the first region identifier from the first layer table; based on the first navigation identifier, determining the authority corresponding to the first navigation identifier from the second layer table.
[0155] In order to find the first area identifier from the first layer table more quickly, when creating the first layer table, an index, such as a B+ index, can be created for the area identifier in the first layer table, and the corresponding area identifier can be quickly found based on the index later. In some embodiments, the first layer table includes indexes corresponding to the area identifiers of each sub-area. The computer device determines the first navigation identifier corresponding to the first area identifier from the first layer table based on the first area identifier, including: searching the first area identifier in the first layer table based on the indexes corresponding to the first area identifier and the area identifiers of each sub-area; and determining the first navigation identifier corresponding to the first area identifier in the first layer table.
[0156] 210. When the authority corresponding to the first region identifier allows, the computer device obtains the storage location corresponding to the first region identifier from the header file, and reads the layer sub-data of the first sub-region based on the storage location.
[0157] In a possible implementation, the GeoEast system divides the user's access operations into point, line, and surface data access operations. The header file is also used to indicate the storage position of the stratigraphic point sub-data, stratigraphic line sub-data, and stratigraphic surface sub-data of each sub-area in the first file to which they belong. The computer device obtains the storage position of the first file to which the stratigraphic sub-data of the first sub-area belongs from the header file, and reads the stratigraphic sub-data of the first sub-area based on the storage position, including: when the access operation is an access operation of point data, the storage position of the stratigraphic point sub-data of the first sub-area in the first file to which it belongs is obtained from the header file; based on the storage position, the stratigraphic point sub-data of the first sub-area is read; when the access operation is an access operation of line data, the storage position of the stratigraphic line sub-data of the first sub-area in the first file to which it belongs is obtained from the header file; based on the storage position, the stratigraphic line sub-data of the first sub-area is read; when the access operation is an access operation of surface data, the storage position of the stratigraphic surface sub-data of the first sub-area in the first file to which it belongs is obtained from the header file; based on the storage position, the stratigraphic surface sub-data of the first sub-area is read.
[0158] In some embodiments, since the database is provided with a concurrency control mechanism, the concurrency control mechanism controls user access by changing permissions. Therefore, after the computer device reads the layer sub-data of the first sub-area based on the storage location, the method also includes: modifying the permissions corresponding to the first sub-area identifier in the second layer table.
[0159] In some embodiments, the first layer table is also used to record the user's access to the header file. The method also includes: after reading the storage path of the layer table record in the database, adding the access record of the header file in the first layer table. Among them, the access record may include the visitor, the access time, etc., and the embodiment of the present application does not limit the access record. In some embodiments, the second layer table is also used to record the user's access to the first sub-area. The method also includes: after reading the layer sub-data of the first sub-area based on the storage location, adding the access record of the first sub-area in the second layer table. Among them, the access record may include the visitor, the access time, etc., and the embodiment of the present application does not limit the access record.
[0160] In the layer data access method provided in the embodiment of the present application, the first area is divided into multiple sub-areas, and the layer sub-data of each sub-area is stored in different files, so that the user does not need to access all the layer data of the entire first area, and the user can only access the layer sub-data of one sub-area. Since the layer sub-data of a sub-area are relatively small, the reading efficiency of the layer data can be improved, and the response efficiency can be improved. When determining the sub-area accessed by the user, the area identifier of the sub-area is obtained through the file header and the database. Since the database is provided with a concurrent control mechanism, the area identifier is obtained through the file header and the database, and then the corresponding file is read, which can avoid multiple users from reading and writing the file at the same time, reducing the occurrence of dirty reads. Therefore, the layer data access method provided in the embodiment of the present application not only improves the reading efficiency and response efficiency of the layer data, but also can avoid dirty reads as much as possible.
[0161] like Figure 7 and Figure 8 As shown, the embodiment of the present application stores the layer data of the first area into multiple cell files respectively, and sets a header file so as to quickly locate the data required by the user from the multiple cell files. When faced with tens of millions of data or even hundreds of millions of data, the performance comparison between the method provided by the embodiment of the present application and the method in the related art (the layer data of the first area is stored in one file) is as follows:
[0162] When faced with billions of data, the efficiency of the two methods is shown in Table 1:
[0163]
[0164] Table 1
[0165] When faced with tens of millions of data, the efficiency of the two methods is as follows: Fig. 9 As shown, Fig. 9 The original method in the above is the method in the related art. Fig. 9 The new method is the method provided in the embodiments of the present application.
[0166] Fig.10 is a schematic diagram of a structure of a device for implementing simultaneous access by multiple users provided in an embodiment of the present application, such as Fig.10 As shown, the device comprises:
[0167] A division module 1001 is used for dividing the stratigraphic data of the first stratigraphic layer into stratigraphic sub-data corresponding to a plurality of sub-regions in response to a split storage operation on the first stratigraphic layer of the first region;
[0168] A storage module 1002 is used to store the stratigraphic sub-data corresponding to the plurality of sub-regions in a plurality of first files respectively, and different first files are used to store the stratigraphic sub-data corresponding to different sub-regions;
[0169] A generating module 1003 is used to generate a header file corresponding to the plurality of first files, wherein the header file is used to record the data storage conditions of the plurality of first files, and the header file is used to indicate the location information of each sub-region, the region identifier and the storage location of the first file to which the layer sub-data of each sub-region belongs;
[0170] An adding module 1004 is used for adding the storage path of the header file to a layer table of the authority management database of the first stratum in response to the first adding operation, wherein the layer table is used for managing the access rights of each sub-area;
[0171] A receiving module 1005 is configured to receive an access operation to the first stratum, wherein the access operation carries first location information, and the first location information is used to indicate an accessed location in the first stratum;
[0172] A reading module 1006 is used to read the storage path of the header file recorded in the layer table in the authority management database in response to the access operation, and read the header file based on the storage path of the header file;
[0173] A determination module 1007, configured to determine a first region identifier of a first subregion based on the first location information and the location information and region identifiers of each subregion indicated in the header file, wherein the first subregion is a subregion including the accessed location;
[0174] The determination module 1007 is further used to determine the authority corresponding to the first area identifier in the layer table based on the first area identifier and the concurrency control mechanism of the authority management database, wherein the concurrency control mechanism is used to change the authority corresponding to the first area identifier based on the process accessing the layer sub-data of the first sub-region;
[0175] The reading module 1006 is further used to obtain the storage location of the first file to which the layer sub-data of the first sub-area belongs from the header file when the permission corresponding to the first area identifier allows, and read the layer sub-data of the first sub-area based on the storage location.
[0176] like Fig.11 As shown, in a possible implementation, the storage module 1002 is used to generate the layer point data, layer line data and layer surface data based on the layer data of the first layer; divide the layer point data, layer line data and layer surface data of the first stratum into layer point sub-data, layer line sub-data and layer surface sub-data corresponding to a plurality of sub-regions, and store the layer point sub-data, layer line sub-data and layer surface sub-data corresponding to the same sub-region in the same first file;
[0177] The header file is also used to indicate the storage positions of the layer site sub-data, layer line sub-data and layer surface sub-data of each sub-area in the first file to which they belong; the reading module 1006 is used to obtain the storage position of the layer site sub-data of the first sub-area in the first file to which it belongs from the header file when the access operation is an access operation for point data; based on the storage position, read the layer site sub-data of the first sub-area; when the access operation is an access operation for line data, obtain the storage position of the layer line sub-data of the first sub-area in the first file to which it belongs from the header file; based on the storage position, read the layer line sub-data of the first sub-area; when the access operation is an access operation for surface data, obtain the storage position of the layer surface sub-data of the first sub-area in the first file to which it belongs from the header file; based on the storage position, read the layer surface sub-data of the first sub-area.
[0178] In one possible implementation, the determination module 1007 is used to determine the permissions corresponding to the first area identifier and the data access type in the layer table based on the first area identifier, the concurrency control mechanism of the permission management database, and the data access type corresponding to the access operation, wherein the data access type is used to indicate whether the access operation is an access operation for point data, an access operation for line data, or an access operation for surface data.
[0179] In a possible implementation, the device further includes at least one of the following:
[0180] The adding module 1004 is further used to add the access record of the header file in the layer table after reading the storage path of the layer table record in the authority management database;
[0181] A modification module 1008 is used to modify the authority corresponding to the first sub-region identifier in the layer table after reading the layer sub-data of the first sub-region based on the storage location;
[0182] The adding module 1004 is further configured to add the access record of the first sub-region to the layer table after reading the layer sub-data of the first sub-region based on the storage location.
[0183] In a possible implementation, the layer table includes a first layer table and a second layer table, the first layer table stores the storage path of the header file, the area identifier of each sub-area and the corresponding navigation identifier, the second layer table stores the authority of each sub-area and the corresponding navigation identifier, and the navigation identifier is a foreign key of the first layer table and the second layer table;
[0184] The determination module 1007 is used to determine the first navigation identifier corresponding to the first area identifier from the first layer table based on the first area identifier; and determine the authority corresponding to the first navigation identifier from the second layer table based on the first navigation identifier.
[0185] In a possible implementation, the first layer table includes indexes corresponding to the area identifiers of the respective sub-areas; the determination module 1007 is used to search for the first area identifier in the first layer table based on the indexes corresponding to the first area identifier and the area identifiers of the respective sub-areas; and determine the first navigation identifier corresponding to the first area identifier in the first layer table.
[0186] In a possible implementation, the header file stores the region identifier of the first sub-region, the region identifier of the last sub-region, and the region identifier interval, and also stores the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of the multiple sub-regions, and also stores the horizontal coordinate difference and the vertical coordinate difference of adjacent sub-regions;
[0187] The determination module 1007 is used to determine the positional relationship between the sub-region to which the first position information belongs and the first sub-region based on the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate and the minimum vertical coordinate of the multiple sub-regions, the horizontal coordinate interval and the vertical coordinate interval of adjacent sub-regions and the first position information; and determine the first sub-region identifier of the first sub-region to which the first position information belongs based on the positional relationship, the region identifier interval, the region identifier of the first sub-region and the region identifier of the last sub-region.
[0188] In a possible implementation, the division module 1001 is used to generate a vector grid including the first region based on the shape information of the first region; divide the vector grid based on a first segmentation size to obtain a plurality of tile grids, where one tile grid corresponds to one sub-region;
[0189] The storage module 1002 is used to store the layer sub-data belonging to the same tile grid in the layer data of the first area into a first file corresponding to the tile grid.
[0190] It should be noted that: the device for realizing multi-user simultaneous access provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when realizing multi-user simultaneous access. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the method embodiment for realizing multi-user simultaneous access provided in the above embodiment belongs to the same concept as the method embodiment for realizing multi-user simultaneous access. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0191] Fig.12 The terminal 1200 includes a processor 1201 and a memory 1202 .
[0192] The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0193] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one program code, which is used to be executed by the processor 1201 to implement the method for implementing multi-user simultaneous access provided by the method embodiment of the present application.
[0194] In some embodiments, the terminal 1200 may also optionally include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202 and the peripheral device interface 1203 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1203 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1204, a display screen 1205, a camera 1206, an audio circuit 1207, a positioning component 1208 and a power supply 1209.
[0195] The peripheral device interface 1203 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, the memory 1202, and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202, and the peripheral device interface 1203 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0196] The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to collect touch signals on the surface or above the surface of the display screen 1205. The touch signal can be input to the processor 1201 as a control signal for processing. At this time, the display screen 1205 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1205 can be one, and the front panel of the terminal 1200 is set; in other embodiments, the display screen 1205 can be at least two, which are respectively set on different surfaces of the terminal 1200 or are folded; in some other embodiments, the display screen 1205 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 1200. Even, the display screen 1205 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1205 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0197] The power supply 1209 is used to power various components in the terminal 1200. The power supply 1209 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1209 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0198] Those skilled in the art will understand that Fig.12 The structure shown in the figure does not constitute a limitation on the terminal 1200, and the terminal 1200 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0199] Fig.13 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1300 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1301 and one or more memories 1302, wherein the memory 1302 stores at least one program code, and the at least one program code is loaded and executed by the processor 1301 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.
[0200] The server 1300 is used to execute the steps executed by the server in the above method embodiment.
[0201] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the method for achieving simultaneous access by multiple users as described in any of the above implementations.
[0202] An embodiment of the present application further provides a computer program product, which includes at least one program code, and the at least one program code is loaded and executed by a processor to implement the method for achieving simultaneous access by multiple users as described in any of the above implementations.
[0203] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.
[0204] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for achieving multi-user simultaneous access, characterized in that: Applied to the GeoEast system, the method comprises: In response to the split storage operation on the first stratum in the first area, the stratigraphic data of the first stratum is divided into stratigraphic sub-data corresponding to a plurality of sub-areas, and the stratigraphic sub-data corresponding to the plurality of sub-areas are respectively stored in a plurality of first files, where different first files are used to store stratigraphic sub-data corresponding to different sub-areas; Generate a header file corresponding to the plurality of first files, the header file is used to record the data storage conditions of the plurality of first files, the header file is used to indicate the location information of each sub-region, the region identifier and the storage location of the first file to which the layer sub-data of each sub-region belongs; In response to the first adding operation, adding the storage path of the header file to a layer table of the authority management database of the first stratum, the layer table being used to manage the access rights of the respective sub-areas; receiving an access operation to the first stratum, the access operation carrying first location information, the first location information being used to indicate an accessed location in the first stratum; In response to the access operation, reading the storage path of the header file recorded in the layer table in the authority management database; Based on the storage path of the header file, read the header file, and determine a first area identifier of a first sub-area based on the first location information and the location information and area identifiers of each sub-area indicated in the header file, where the first sub-area is a sub-area that includes the accessed location; Determining the authority corresponding to the first region identifier in the layer table based on the first region identifier and a concurrency control mechanism of the authority management database, wherein the concurrency control mechanism is used to change the authority corresponding to the first region identifier based on a process accessing the layer sub-data of the first sub-region; If the permission corresponding to the first region identifier allows, the storage location of the first file to which the layer sub-data of the first sub-region belongs is obtained from the header file, and the layer sub-data of the first sub-region is read based on the storage location.
2. The method according to claim 1, characterized in that The step of dividing the stratigraphic data of the first stratigraphic layer into stratigraphic sub-data corresponding to a plurality of sub-regions, and storing the stratigraphic sub-data corresponding to the plurality of sub-regions in a plurality of first files respectively, comprises: Based on the horizon data of the first horizon, generating horizon point data, horizon line data and horizon surface data; Dividing the stratigraphic point data, stratigraphic line data and stratigraphic surface data of the first stratigraphic layer into stratigraphic point sub-data, stratigraphic line sub-data and stratigraphic surface sub-data corresponding to a plurality of sub-regions, and storing the stratigraphic point sub-data, stratigraphic line sub-data and stratigraphic surface sub-data corresponding to the same sub-region in the same first file; The header file is also used to indicate the storage location of the stratigraphic point sub-data, stratigraphic line sub-data and stratigraphic surface sub-data of each sub-area in the first file to which they belong; the step of obtaining the storage location of the first file to which the stratigraphic sub-data of the first sub-area belongs from the header file, and reading the stratigraphic sub-data of the first sub-area based on the storage location, comprises: When the access operation is an access operation of point data, obtaining the storage position of the layer site sub-data of the first sub-region in the first file to which it belongs from the header file; and reading the layer site sub-data of the first sub-region based on the storage position; When the access operation is an access operation of line data, the storage position of the layer line sub-data of the first sub-region in the first file to which it belongs is obtained from the header file; based on the storage position, the layer line sub-data of the first sub-region is read; When the access operation is an access operation of surface data, the storage position of the layer surface sub-data of the first sub-region in the first file to which it belongs is obtained from the header file; and based on the storage position, the layer surface sub-data of the first sub-region is read.
3. The method according to claim 2, characterized in that The concurrent control mechanism based on the first area identifier and the authority management database determines the authority corresponding to the first area identifier in the layer table, including: Based on the first area identifier, the concurrency control mechanism of the permission management database and the data access type corresponding to the access operation, the permission corresponding to the first area identifier and the data access type in the layer table is determined, wherein the data access type is used to indicate whether the access operation is an access operation for point data, an access operation for line data or an access operation for surface data.
4. The method according to claim 1, characterized in that: The method further comprises at least one of the following: After reading the storage path of the layer table record in the authority management database, adding the access record of the header file in the layer table; After reading the layer sub-data of the first sub-region based on the storage location, modifying the authority corresponding to the first sub-region identifier in the layer table; After reading the layer sub-data of the first sub-region based on the storage location, an access record of the first sub-region is added to the layer table.
5. The method according to claim 1, characterized in that The layer table includes a first layer table and a second layer table, wherein the first layer table stores the storage path of the header file, the area identifier of each sub-area and the corresponding navigation identifier, and the second layer table stores the authority of each sub-area and the corresponding navigation identifier, and the navigation identifier is a foreign key of the first layer table and the second layer table; The concurrent control mechanism based on the first area identifier and the authority management database determines the authority corresponding to the first sub-area in the layer table, including: Based on the first area identifier, determining a first navigation identifier corresponding to the first area identifier from the first layer table; Based on the first navigation identifier, the authority corresponding to the first navigation identifier is determined from the second layer table.
6. The method according to claim 5, characterized in that The first layer table includes indexes corresponding to the area identifiers of the respective sub-areas; and determining, based on the first area identifier, from the first layer table a first navigation identifier corresponding to the first area identifier includes: searching the first region identifier in the first layer table based on the first region identifier and the indexes corresponding to the region identifiers of each sub-region; Determine a first navigation identifier corresponding to the first area identifier in the first layer table.
7. The method according to claim 1, characterized in that The header file stores the region identifier of the first sub-region, the region identifier of the last sub-region, and the region identifier interval, and also stores the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of the multiple sub-regions, and also stores the horizontal coordinate difference and the vertical coordinate difference of adjacent sub-regions; The determining, based on the first position information and the position information and the region identifiers of the respective sub-regions indicated by the header file, a first region identifier of the first sub-region includes: Determine a positional relationship between the subregion to which the first position information belongs and the first subregion based on the maximum abscissa, the minimum abscissa, the maximum ordinate and the minimum ordinate of the multiple subregions, the abscissa interval and the ordinate interval of adjacent subregions and the first position information; A first sub-region identifier of a first sub-region to which the first location information belongs is determined based on the position relationship, the region identifier interval, the region identifier of the first sub-region, and the region identifier of the last sub-region.
8. The method according to claim 1 or 5, characterized in that: The step of dividing the stratigraphic data of the first stratigraphic layer into stratigraphic sub-data corresponding to a plurality of sub-regions, and storing the stratigraphic sub-data corresponding to the plurality of sub-regions in a plurality of first files respectively, comprises: Based on the shape information of the first area, generating a vector grid including the first area; Based on the first segmentation size, the vector grid is segmented to obtain a plurality of tile grids, where one tile grid corresponds to one sub-region; The layer sub-data belonging to the same tile grid in the layer data of the first area are stored in a first file corresponding to the tile grid.
9. A device for realizing multi-user simultaneous access, characterized in that: The device comprises: A division module, configured to divide the stratigraphic data of the first stratigraphic layer into stratigraphic sub-data corresponding to a plurality of sub-regions in response to a split storage operation on the first stratigraphic layer of the first region; A storage module, used for storing the stratigraphic sub-data corresponding to the plurality of sub-regions in a plurality of first files respectively, wherein different first files are used for storing the stratigraphic sub-data corresponding to different sub-regions; A generating module, used for generating a header file corresponding to the plurality of first files, wherein the header file is used for recording the data storage conditions of the plurality of first files, and the header file is used for indicating the location information of each sub-region, the region identifier and the storage location of the first file to which the layer sub-data of each sub-region belongs; an adding module, configured to add the storage path of the header file to a layer table of a permission management database of the first stratum in response to a first adding operation, wherein the layer table is used to manage access rights of each sub-area; A receiving module, configured to receive an access operation to the first stratum, wherein the access operation carries first location information, and the first location information is used to indicate an accessed location in the first stratum; A reading module, configured to read the storage path of the header file recorded in the layer table in the authority management database in response to the access operation, and read the header file based on the storage path of the header file; a determination module, configured to determine a first area identifier of a first sub-area based on the first location information and the location information and area identifiers of each sub-area indicated in the header file, wherein the first sub-area is a sub-area including the accessed location; The determination module is further used to determine the authority corresponding to the first area identifier in the layer table based on the first area identifier and a concurrency control mechanism of the authority management database, wherein the concurrency control mechanism is used to change the authority corresponding to the first area identifier based on a process accessing the layer sub-data of the first sub-area; The reading module is further used to obtain the storage location of the first file to which the layer sub-data of the first sub-area belongs from the header file when the permission corresponding to the first area identifier allows, and read the layer sub-data of the first sub-area based on the storage location.
10. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the method for realizing multi-user simultaneous access according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the method for realizing multi-user simultaneous access according to any one of claims 1 to 8.