RU2780979C1 - Dynamically allocated database with topological information binding - Google Patents

Dynamically allocated database with topological information binding Download PDF

Info

Publication number
RU2780979C1
RU2780979C1 RU2021119997A RU2021119997A RU2780979C1 RU 2780979 C1 RU2780979 C1 RU 2780979C1 RU 2021119997 A RU2021119997 A RU 2021119997A RU 2021119997 A RU2021119997 A RU 2021119997A RU 2780979 C1 RU2780979 C1 RU 2780979C1
Authority
RU
Russia
Prior art keywords
information
devices
area
dimensional space
coordinates
Prior art date
Application number
RU2021119997A
Other languages
Russian (ru)
Inventor
Дмитрий Петрович Грибов
Original Assignee
Дмитрий Петрович Грибов
Filing date
Publication date
Application filed by Дмитрий Петрович Грибов filed Critical Дмитрий Петрович Грибов
Priority to PCT/RU2022/050203 priority Critical patent/WO2023282793A2/en
Application granted granted Critical
Publication of RU2780979C1 publication Critical patent/RU2780979C1/en

Links

Images

Abstract

FIELD: computing technology.
SUBSTANCE: method for collecting, storing, updating, and processing information about an n-dimensional space pre-divided into topological, including geometric, topographic areas; including collecting information by the collection tools located on devices with coordinates in the described space, capable of sharing information, jointly forming a connected graph; placing the information related to the topological area on the information storage media located on said devices connected to a community, currently having coordinates within this and the neighbouring areas; exchanging information with devices with coordinates in this or other, primarily adjacent, areas; deleting the information related to the topological area when the coordinates of the device are changed to ones remote from the area.
EFFECT: reduced demand for computing resources and bandwidth of the network channel with an increase in the database size.
17 cl, 1 dwg

Description

ОБЛАСТЬ ЗНАНИЙFIELD OF KNOWLEDGE

Изобретение относится к упорядоченным массивам информации, логически организованным в базы данных, хранимые на физических носителях, например, магнитных дисках, и к способам управления базами данных, реализуемым на основе программных средств, обрабатывающих информацию с помощью компьютеров.The invention relates to ordered arrays of information logically organized into databases stored on physical media, such as magnetic disks, and to methods for managing databases implemented on the basis of software that processes information using computers.

База данных (далее - БД) характеризуется своей логической моделью и состоит из отдельных записей - данных, содержащих отличительные характеристики. Группы данных объединены в подмножества.The database (hereinafter referred to as the DB) is characterized by its logical model and consists of separate records - data containing distinctive characteristics. Data groups are grouped into subsets.

В состав информации входят собственно данные, описывающие объекты предметной области, и метаданные, систематизирующие объекты предметной области. Физическая структура данных обеспечивает хранение и обработку информации программными средствами.The structure of information includes the actual data that describes the objects of the subject area, and metadata that systematizes the objects of the subject area. The physical structure of the data provides for the storage and processing of information by software.

Способ управления БД основан на выполнении операций записи, чтения, удаления, изменения, многопользовательского доступа к информации и восстановления внутренней непротиворечивости информации после нештатного завершения работы одного или нескольких пользователей БД. Операции с информацией выполняются в форме транзакций - групп последовательных действий, представляющих собой логические единицы работы с данными, и фиксируются в виде лога (transaction log, https://en.wikipedia.org/wiki/Transaction log), фиксирующего последовательность выполнения транзакций и их конкретное наполнение.The database management method is based on performing operations of writing, reading, deleting, modifying, multi-user access to information and restoring internal consistency of information after an abnormal shutdown of one or more database users. Operations with information are performed in the form of transactions - groups of sequential actions, which are logical units of work with data, and are recorded in the form of a log (transaction log, https://en.wikipedia.org/wiki/Transaction log), fixing the sequence of transactions and their specific content.

Заявляется архитектура распределенной базы данных, функционирующей как "рой" - совокупность из самостоятельных устройств. Каждое устройство работает с ограниченным фрагментом данных и периодически (по возможности чаще) синхронизирует состояние видимого ему фрагмента БД с другими (преимущественно "соседними") устройствами. Благодаря топологической (например, геометрической или топографической) N-мерной сегментации базы, логу транзакций, а также эффективной процедуре синхронизации между агентами, предлагаемая БД, реализованная на базе "роя" самостоятельных устройств, может эффективно работать с практически неограниченным объемом данных и операций по их изменению. Возможно, например, применять, в компьютерных играх, транспортных системах и т.д. Устройства обмениваются обновлениями БД между собой напрямую через Р2Р соединения, при посредничестве друг друга или сервера.The architecture of a distributed database is claimed, functioning as a "swarm" - a collection of independent devices. Each device works with a limited data fragment and periodically (as often as possible) synchronizes the state of the database fragment visible to it with other (mainly "neighboring") devices. Thanks to the topological (for example, geometric or topographic) N-dimensional segmentation of the database, the transaction log, as well as an effective synchronization procedure between agents, the proposed database, implemented on the basis of a "swarm" of independent devices, can effectively work with an almost unlimited amount of data and operations on them. change. It is possible, for example, to use in computer games, transport systems, etc. Devices exchange database updates between themselves directly via P2P connections, mediated by each other or by the server.

УРОВЕНЬ ТЕХНИКИ И ПРОТОТИПBACKGROUND AND PROTOTYPE

Известен (патент США №8276084) способ доставки контента в область виртуального пространства (ВП), включающий: обнаружение (выявление) множества взаимодействий между участниками (устройствами); отслеживание множества выявленных взаимодействий; оценку степени загруженности сервера, поддерживающего область ВП для определения, превысила ли загрузка предварительно назначенный порог; формирование набора подгрупп устройств в области, если предварительно назначенный порог загрузки превышен, каждая из набора подгрупп содержащих одно или более устройств для которых выполняется выявление и отслеживание; и ответственный за превышение пред. назначенного порога нагрузки, если объем данных переданных на или от сервера превысит предварительно назначенный порог объема (широковещательного) трафика, передавая по крайней мере часть из объема данных ВП между устройствами одной конкретной подгруппе из списка подгрупп с использованием Р2Р обмена данными (широковещания), где все устройства в одной конкретной подгруппе из набора подгрупп передают по крайней мере часть данных ВП на или от сервера, где, если объем данных ВП ниже предварительно назначенного уровня (т.е. понижается) объема трафика, перестает передавать часть объема данных ВП между устройствами конкретной подгруппы из набора подгрупп.Known (US patent No. 8276084) method of delivering content to the area of virtual space (VP), including: detection (detection) of multiple interactions between participants (devices); tracking multiple identified interactions; evaluating the load level of the server supporting the VP region to determine if the load has exceeded a predetermined threshold; forming a set of subgroups of devices in the area, if a predetermined load threshold is exceeded, each of the set of subgroups containing one or more devices for which detection and tracking is performed; and responsible for exceeding the prev. assigned load threshold, if the amount of data transferred to or from the server exceeds the pre-assigned threshold of the amount of (broadcast) traffic, transferring at least a part of the amount of IP data between devices to one specific subgroup from the list of subgroups using P2P data exchange (broadcast), where all devices in one specific subgroup of a set of subgroups transmit at least a portion of the VP data to or from the server, where, if the amount of VP data is below a pre-assigned level (i.e., decreases) of traffic volume, stops transmitting part of the amount of VP data between devices of a particular subgroup from a set of subgroups.

Недостатки способа следующие. Метод освобождает сетевой канал сервера от раздачи неприоритетного, статического контента, при этом обмен новой информацией (изменениями) между клиентами осуществляется строго при посредничестве сервера, что, с одной стороны, оставляет на сервере существенную нагрузку и, с другой стороны, ставит клиентов в зависимость от времени отклика сервера. Таким образом данный метод не дает выигрыша при росте активности клиентов. Так же документ не описывает механизмов чтения, записи и синхронизации БД для устройств.The disadvantages of the method are as follows. The method frees the server network channel from distributing non-priority, static content, while the exchange of new information (changes) between clients is carried out strictly through the mediation of the server, which, on the one hand, leaves a significant load on the server and, on the other hand, makes clients dependent on server response time. Thus, this method does not benefit from an increase in customer activity. Also, the document does not describe the mechanisms for reading, writing and synchronizing the database for devices.

Известен (патент США №10825024) способ, устройства и системы для платформ управления данными на базе DLT. Описаны несколько воплощений посвященных распределенным учетным (бухг.) системам (т.е. распределенные системы с применением фин. учетных технологий в децентрализованной компьютерной сети) которые могут использоваться для работы и управления распределением и доступом к данным так, чтобы сохранить преимущества распределенной учетной (финансовой) технологии позволяя также частный обмен данными. В особенности описанные распределенные учетные системы включают на платформу управления данными на основе технологии распределенного учета (DLT), которая может быть применена на узлах сети управления данными.Known (US patent No. 10825024) method, devices and systems for data management platforms based on DLT. Several embodiments of distributed accounting (accounting) systems (i.e. distributed systems using financial accounting technologies in a decentralized computer network) are described that can be used to operate and manage the distribution and access to data so as to retain the advantages of a distributed accounting (financial ) technology allowing also private data exchange. In particular, the described distributed accounting systems include a data management platform based on distributed accounting technology (DLT), which can be applied at the nodes of the data management network.

Технология требует, чтобы полный лог хранился и обновлялся на каждом клиенте, то есть метод не имеет механизмов масштабирования так как требования к вычислительным ресурсам клиентов и ширине канала растут неограниченно и синхронно с ростом числа клиентов и/или транзакций.The technology requires that the full log be stored and updated on each client, that is, the method does not have scaling mechanisms, since the requirements for the computing resources of clients and the bandwidth grow indefinitely and synchronously with the growth of the number of clients and/or transactions.

Известен (патент США №9571571 от 04.09.2012). В документе раскрывается способ создания сообществ в Р2Р сети.Known (US patent No. 9571571 dated 09/04/2012). The document reveals a way to create communities in the P2P network.

В соответствии с Р2Р протоколом, Р2Р сеть включает множество клубов (сообществ) и множество устройств (рядовых участников), которые получают контент, рассылаемый средствами сети. Каждый из множества рядовых участников является частью по крайней мере 2-х сообществ. Объединяющий участник идентифицирует сообщество (клуб) Р2Р сети для присоединения (к какому хочет присоединиться) и получает идентификационную информацию для участника указанного сообщества (клуба). Присоединяющийся участник случайным образом выбирает среди участников выбранного сообщества (клуба) по крайней мере первого участника и второго участника, с кем осуществить соединения. Соединение является пропорционально взвешенным (средневзвешенным) от числа соединений первого участника с остальными участниками и числа соединений второго участника с остальными участниками. Присоединяющийся участник устанавливает первое соединение с первым участником, и второе соединение со вторым участником.In accordance with the P2P protocol, the P2P network includes many clubs (communities) and many devices (ordinary participants) that receive content distributed by means of the network. Each of the many ordinary members is part of at least 2 communities. The uniting participant identifies the community (club) of the P2P network to join (which one he wants to join) and receives identification information for the member of the specified community (club). The joining member randomly chooses among the members of the selected community (club) at least the first member and the second member with whom to connect. The connection is proportionally weighted (weighted average) of the number of connections of the first participant with other participants and the number of connections of the second participant with other participants. The joining party establishes a first connection with the first party, and a second connection with the second party.

Недостатком данного способа является то, что он посвящен частной задаче способа присоединения к сообществу и не решает задачи предоставления доступа устройств к консистентной БД, равно как и оптимизации и/или снижения потребности в вычислительных ресурсах при увеличении объема БД.The disadvantage of this method is that it is dedicated to the particular task of joining the community and does not solve the problem of providing device access to a consistent database, as well as optimizing and/or reducing the need for computing resources with an increase in the size of the database.

Известен (патент США №9210085 от 05.10. 2007). Раскрывается процедура Р2Р протокол, такой как BitTorrent, использован для помощи в потоковой передаче данных. Участники загружают потоковый контент из Р2Р сети, одновременно воспроизводя загружаемый контент. В то время, как поток проигрывается, конечная система загружает пропущенные части напрямую с сервера или другого инфраструктурного узла. Этот способ эквивалентен значительному увеличению (в квадрате) емкости сервера и может быть более точно настроен для достижения на в среднем 0 (1)-м сервере вне зависимости от числа конкурирующих пользователей. Таким образом BitTorrent помогает потоковому процессу лучше, чем традиционные сервер-клиентские и только-инфраструктурные решения, каждое из которых требует множество инфраструктурных узлов, которые увеличивают линейно к числу пользователей.Known (US patent No. 9210085 dated 05.10. 2007). Procedure Disclosed A P2P protocol, such as BitTorrent, is used to assist in streaming data. Participants download streaming content from the P2P network while simultaneously playing the downloaded content. While the stream is playing, the end system downloads the skipped parts directly from the server or other infrastructure node. This method is equivalent to a significant increase (squared) in server capacity and can be fine-tuned to achieve an average of 0 (1)th server regardless of the number of competing users. In this way, BitTorrent aids the streaming process better than traditional server-client and infrastructure-only solutions, each of which requires multiple infrastructure nodes that increase linearly to the number of users.

Недостатком данного способа является то, что он посвящен частной задаче односторонней передачи потокового контента, и решает задачу оптимизации и/или снижения потребности в вычислительных ресурсах и пропускной полосе сети при увеличении числа клиентов-получателей потока данных, но не обеспечивает клиентам возможность интерактивного чтения данных из БД и записи в БД.The disadvantage of this method is that it is dedicated to the particular problem of one-way transmission of streaming content, and solves the problem of optimizing and/or reducing the need for computing resources and network bandwidth with an increase in the number of clients receiving the data stream, but does not provide clients with the ability to interactively read data from DB and records in the DB.

Известен (патент США №9177328 от 21.06.2012 Раскрывается способ добавления участника в сообщество сети. Ближайший участник передает присоединяющемуся участнику информацию для присоединения (контактную информацию) о тех участниках, и присоединяющийся участник устанавливает с ними связь. Участники сообщества размещают объявления для чат-комнат, чтобы присоединиться к чат-комнате, участник выясняет, кто из участников ближе всего находится к чат-комнате по идентификатору чат-комнаты, и извещает его о том, что он участник чат-комнаты.Known (U.S. Patent No. 9177328 dated June 21, 2012) A method for adding a member to a network community is disclosed. A nearby member sends joining member information (contact information) about those members to the joining member, and the joining member establishes a connection with them. Community members place announcements for chat rooms to join a chat room, the participant finds out which participant is closest to the chat room by the chat room ID and notifies them that they are a member of the chat room.

Основным сходством является способ организации сообщества и взаимодействия между узлами, в т.ч. напрямую, поддержка связного графа всех участников сети, создание и разрыв Р2Р подключений по инициативе участников для формирования ими прямых соединений нужной конфигурации. Недостатком данного способа является то, что он посвящен частной задаче способа присоединения к сообществу и перестройки сетевых соединений для формирования сообществ, но не решает задачу предоставления доступа всех подключенных устройств к единой для всех участников консистентной БД.The main similarity is the way the community is organized and the interaction between the nodes, incl. directly, supporting a connected graph of all network participants, creating and breaking P2P connections on the initiative of the participants in order to form direct connections of the desired configuration. The disadvantage of this method is that it is dedicated to the particular task of joining a community and rebuilding network connections to form communities, but does not solve the problem of providing access for all connected devices to a single consistent database for all participants.

В качестве прототипа выбран патент США №8276084.US patent No. 8276084 was chosen as a prototype.

Техническим результатом, достигаемым настоящим изобретением является предоставление устройствам доступа к логически консистентной БД, а также сокращение потребности в вычислительных ресурсах и пропускной способности сетевого канала клиентов (и сервера, если он есть) при увеличении объема БД, числа пользователей и интенсивности записи.The technical result achieved by the present invention is to provide devices with access to a logically consistent database, as well as reducing the need for computing resources and bandwidth of the network channel of clients (and the server, if any) with an increase in the volume of the database, the number of users and recording intensity.

Известные способы и устройства не позволяют достичь заявленный технический результат.Known methods and devices do not allow to achieve the claimed technical result.

КРАТКОЕ ОПИСАНИЕSHORT DESCRIPTION

Заявленный технический результат достигнут предлагаемым способом сбора, хранения, обновления и обработки динамически размещаемой информации с топологической привязкой мест хранения данных.The claimed technical result is achieved by the proposed method for collecting, storing, updating and processing dynamically allocated information with topological reference of data storage locations.

Заявляемый способ сбора, хранения, обновления и обработки информации об n-мерном пространстве, заранее разбитом на топологические (например, геометрические) области, включает сбор информации средствами сбора, находящимися на устройствах, имеющих координаты в описываемом пространстве и способных обмениваться информацией между собой, всех вместе образующих сообщество, где каждое устройство может обмениваться информацией с каждым напрямую или при посредничестве других устройств (связный граф), размещение информации, относящейся к топологической области, на средствах хранения информации, расположенных на указанных (подключенных к сообществу) устройствах, имеющих в этот момент координаты в пределах этой области и соседних (смежных) областей, обмен информацией с устройствами, имеющими координаты в этой или других, преимущественно смежных, областях, удаление информации касающейся топологической области, при изменении координат устройства на другие, удаленные от данной области.The claimed method for collecting, storing, updating and processing information about an n-dimensional space, pre-divided into topological (for example, geometric) areas, includes the collection of information by means of collection located on devices that have coordinates in the described space and are capable of exchanging information with each other, all together forming a community, where each device can exchange information with each directly or through the mediation of other devices (connected graph), placing information related to the topological area on information storage facilities located on the specified (connected to the community) devices that have at that moment coordinates within this area and neighboring (adjacent) areas, exchange of information with devices having coordinates in this or other, mostly adjacent, areas, deletion of information relating to the topological area, when the device coordinates change to others remote from this area.

Заявляется динамическая система сбора, обработки и размещения информации об n-мерном пространстве, включающаяA dynamic system for collecting, processing and placing information about an n-dimensional space is claimed, including

- n-мерное пространство, предварительно разбитое на сегменты, формирующие замощение (паркет) с полным покрытием пространства.- n-dimensional space, previously divided into segments, forming a tiling (parquet) with full space coverage.

- одно или более устройство, которому присвоены координаты в n-мерном пространстве, снабженное одним или более средством сбора информации, средством хранения информации, средством связи (приема и передачи) с другими устройствами, с возможностью перемещения как внутри одной топологической области, так и на любую из смежных топологических областей.- one or more devices assigned coordinates in n-dimensional space, equipped with one or more means of collecting information, means of storing information, means of communication (reception and transmission) with other devices, with the ability to move both within one topological area and on any of the adjacent topological regions.

Средство хранения информации может дополнительно включать средство хранения статуса информации, фрагмент общего распределенного лога транзакций (DLT).The information storage means may further include an information status storage means, a fragment of a shared distributed transaction log (DLT).

В логе операций (DLT) могут храниться отдельные операции. При этом каждая операция изменяет данные только о заранее фиксированном наборе указанных выделенных областей n-мерного пространства.The transaction log (DLT) can store individual transactions. In this case, each operation changes the data only on a pre-fixed set of the specified selected areas of the n-dimensional space.

Полный лог всех операций может храниться в виде набора выборок из этого полного лога, где каждая указанная выборка состоит из полного перечня операций, относящихся к конкретной топологической области.A complete log of all operations can be stored as a set of samples from this complete log, where each specified sample consists of a complete list of operations related to a particular topological area.

В логическом адресе каждого фрагмента информации (каждой записи в БД) может присутствовать уникальный идентификатор, однозначно определяющий область, к которой принадлежит данная запись.The logical address of each piece of information (each record in the database) may contain a unique identifier that uniquely identifies the area to which the record belongs.

Информация о каждой области пространства может включать перечень всех подключенных к сообществу (графу) устройств, имеющих координаты в данной области.Information about each area of space may include a list of all devices connected to the community (graph) that have coordinates in this area.

Информация (транзакция), в том числе о текущей области (затрагивающая текущую область), может быть записана в локальную память (средство хранения) устройством-инициатором (устройством-источником) первоначально в статусе "не согласована", затем после подтверждения - в статусе "согласована".Information (transaction), including about the current area (affecting the current area), can be written to the local memory (storage medium) by the initiating device (source device) initially in the "inconsistent" status, then after confirmation - in the " agreed."

В локальной памяти (средстве хранения) каждого устройства может храниться информация о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами для своей и смежных областей.The local memory (storage medium) of each device can store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices for its own and adjacent areas.

Новая информация (транзакция) о текущей области может быть записана в локальную память (средство хранения) устройство-инициатор (устройство-источник) первоначально в статусе "принята".New information (transaction) about the current area can be written to the local memory (storage medium) of the initiator device (source device) initially in the "accepted" status.

Возможно дополнительно наличие одного и более устройства с функциями сервера для первичной авторизации устройств, проксирования информации и организации Р2Р взаимодействия между агентами (например, для организации UDP/IP punch hole), не принадлежащего сообществу и не имеющему координат в указанном n-мерном пространстве.It is possible to additionally have one or more devices with server functions for primary authorization of devices, proxying information and organizing P2P interaction between agents (for example, for organizing UDP / IP punch hole), which does not belong to the community and does not have coordinates in the specified n-dimensional space.

Заявляется программный продукт размещенный на компьютерном читаемом устройстве хранения для сбора, хранения, обмена, перемещения контента в геометрической области n-мерного пространства, компьютерно читаемое устройство хранения, содержащее программный код, позволяющий компьютеру выполнять следующие действия: собирать информацию информации средствами сбора, находящимися на устройствах, имеющих координаты в описываемом пространстве, размещение информации, относящейся к геометрической области, на средствах хранения информации, расположенных на указанных устройствах, имеющих в этот момент координаты в пределах этой области, обмен информацией с устройствами имеющими координаты в этой или других, преимущественно смежных, областях.A software product is claimed placed on a computer-readable storage device for collecting, storing, exchanging, moving content in a geometric region of n-dimensional space, a computer-readable storage device containing a program code that allows a computer to perform the following actions: collect information information by means of collection located on devices having coordinates in the described space, placing information related to the geometric area on the information storage means located on the indicated devices having coordinates within this area at that moment, exchanging information with devices having coordinates in this or other, mostly adjacent, areas .

Заявляемый программный продукт может дополнительно позволять компьютеру устройства, имеющего координаты внутри геометрической области передавать другим устройствам, имеющим координаты внутри этой же области и смежных областях, информацию в процессе записи.The claimed software product may additionally allow the computer of a device having coordinates within a geometric region to transmit information to other devices having coordinates within the same region and adjacent regions during the recording process.

Заявляемый программный продукт может дополнительно позволять компьютеру устройства выполнять процедуры записи данных внутри области в следующем порядке:The claimed software product may additionally allow the device computer to perform data writing procedures within the area in the following order:

• каждому устройству хранить у себя информацию о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами в сообществе для своей и смежных областей;• each device to store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices in the community for its own and adjacent areas;

• каждому устройству записывать в локальную память (средство хранения) устройства в статусе "принята" новую информацию (транзакцию) о своей области;• each device to write to the local memory (means of storage) of the device in the "accepted" status new information (transaction) about its area;

• каждому устройству отслеживать все изменения (транзакции), вносимые другими устройствами, имеющими координаты в той же области, где находится устройство, и в смежных областях, а также периодически рассылать всем соседним устройствам информацию о том, какая транзакция была записана этим устройством последней или информацию о том, что запись не осуществлялась;• for each device to keep track of all changes (transactions) made by other devices that have coordinates in the same area where the device is located and in adjacent areas, and also periodically send information to all neighboring devices about which transaction was recorded last by this device or information that the recording was not carried out;

• каждому устройству отслеживать полноту своего лога операций и запрашивать пропущенные транзакции, если о них узнает, либо обновлять для себя информацию об операции, перед которой этому устройству все операции известны.• each device should keep track of the completeness of its log of operations and request missed transactions if it learns about them, or update information about the operation for itself, before which all operations are known to this device.

Заявляемый программный продукт может дополнительно позволять компьютеру устройства выполнять процедуры записи данных внутри области в следующем порядкеThe claimed software product may additionally allow the device computer to perform data writing procedures within the area in the following order

- первичной записи в локальную память (средство хранения) одного устройства,- primary recording in the local memory (storage medium) of one device,

- назначение первичной записи статуса "не согласована",- assignment of the primary record of the status "not agreed",

- рассылки (прямой или посредством пересылки) данных другим устройствам в этой же области (соседям) по области в смежных областях,- distribution (direct or by forwarding) of data to other devices in the same area (neighbors) by area in adjacent areas,

- получение ответа от всех соседних устройств в пределах области и смежных областей, что данные приняты,- receiving a response from all neighboring devices within the area and adjacent areas that data has been received,

- назначение первичной записи статуса "согласована".- assignment of the primary record of the status "approved".

Заявляется размещенная на компьютере система для обмена, хранения, доставки информации в области n-мерного пространства включающая информационную шину, присоединенный к инф. шине процессор, устройство сбора информации, устройство памяти (хранения информации), содержащая инструкции: для сбора информации, обмена данными с другими устройствами, находящимися в n-мерном пространстве.Declared hosted on a computer system for the exchange, storage, delivery of information in the field of n-dimensional space, including information bus attached to inf. bus processor, information collection device, memory device (information storage), containing instructions: for collecting information, exchanging data with other devices located in the n-dimensional space.

Заявляемая размещенная на компьютере система может дополнительно содержать инструкции: устройствам, имеющим координаты внутри геометрической области передавать другим устройствам, имеющим координаты внутри этой же области и смежных областях, информацию в процессе записи.The claimed system hosted on a computer may additionally contain instructions: for devices having coordinates within a geometric region, to transfer information to other devices having coordinates within the same region and adjacent regions during the recording process.

Заявляемая размещенная на компьютере система может дополнительно содержать инструкции, что каждая процедура записи данных в область состоит изThe claimed computer-hosted system may additionally contain instructions that each procedure for writing data to the area consists of

- первичной записи в локальную память (средство хранения) одного устройства,- primary recording in the local memory (storage medium) of one device,

- назначения первичной записи статуса "не согласована",- assignment of the primary record of the status "inconsistent",

- рассылки (прямой или посредством пересылки) данных другим устройствам в этой же области (соседям) по области в смежных областях,- distribution (direct or by forwarding) of data to other devices in the same area (neighbors) by area in adjacent areas,

- получения ответа от всех соседних устройств в пределах области и смежных областей, что данные приняты,- receiving a response from all neighboring devices within the area and adjacent areas that the data has been received,

- назначения первичной записи статуса "согласована".- assignment of the primary record of the status "agreed".

Заявляемая размещенная на компьютере система может дополнительно содержать инструкции: назначить одному из устройств функции сервера по учету взаимодействия устройств или обмена информацией в указанном n-мерном пространстве.The claimed system hosted on a computer may additionally contain instructions: assign server functions to one of the devices to account for device interaction or information exchange in the specified n-dimensional space.

ОПИСАНИЕ ГРАФИЧЕСКОГО МАТЕРИАЛАDESCRIPTION OF GRAPHIC MATERIAL

На Фиг. 1 показана схема размещения объектов на карте и их адресации в БД (пример).On FIG. 1 shows the layout of objects on the map and their addressing in the database (example).

ПОДРОБНОЕ ОПИСАНИЕDETAILED DESCRIPTION

Заявленный технический результат достигнут предлагаемым способом сбора, хранения, обновления и обработки динамически размещаемой информации с топологической привязкой мест хранения данных.The claimed technical result is achieved by the proposed method for collecting, storing, updating and processing dynamically allocated information with topological reference of data storage locations.

Заявляемый способ сбора, хранения, обновления и обработки информации об n-мерном пространстве, заранее разбитом на геометрические области, включает следующие шаги.The claimed method for collecting, storing, updating and processing information about an n-dimensional space, previously divided into geometric regions, includes the following steps.

Сбор информации средствами сбора, находящимися на устройствах, имеющих координаты в описываемом пространстве и способных обмениваться информацией между собой.Collection of information by means of collection located on devices having coordinates in the described space and capable of exchanging information with each other.

Средствами сбора информации могут быть, например, средства фото- и видеофиксации, аудио приборы чтения и записи, датчики контроля излучений, температурные датчики, датчики силы и направления ветра, устройства ручного ввода данных (например, клавиатура) и др.Means of collecting information can be, for example, means of photo and video recording, audio reading and recording devices, radiation control sensors, temperature sensors, wind force and direction sensors, manual data entry devices (for example, a keyboard), etc.

Все устройства вместе образуют сообщество, где каждое устройство может обмениваться информацией с каждым напрямую или при посредничестве других устройств - связный граф.All devices together form a community where each device can exchange information with each directly or through other devices - a connected graph.

Размещение информации, относящейся к геометрической области, происходит на средствах хранения информации (устройствах памяти), расположенных на указанных (подключенных к сообществу) устройствах, имеющих в этот момент координаты в пределах этой и соседних (смежных) областей.The placement of information related to the geometric area occurs on information storage media (memory devices) located on the specified (connected to the community) devices that at that moment have coordinates within this and neighboring (adjacent) areas.

Обмен информацией происходит преимущественно с устройствами, имеющими координаты в этой же области или в смежных, областях. Обмен информацией может происходить и с устройствами из других областей, но выполняется по явному запросу устройства-получателя информации с прямым указанием, какие именно данные требуется ему передать.The exchange of information occurs mainly with devices that have coordinates in the same area or in adjacent areas. The exchange of information can also take place with devices from other areas, but is carried out at the explicit request of the receiving device with a direct indication of what kind of data it needs to transfer.

Удаление информации касающейся геометрической области, происходит при изменении координат устройства на другие, удаленные от данной области.Deletion of information relating to the geometric area occurs when the device coordinates are changed to others, remote from the given area.

Запись и изменение информации может осуществляться через распределенный лог операций (Distributed ledger, DLT) https://en.wikipedia.org/wiki/Distributed ledger, где каждая операция изменяет данные только о заранее фиксированном наборе указанных выделенных областей n-мерного пространства.Recording and changing information can be carried out through a distributed log of operations (Distributed ledger, DLT) https://en.wikipedia.org/wiki/Distributed ledger, where each operation changes data only about a pre-fixed set of specified selected areas of the n-dimensional space.

Полный лог всех операций возможно хранить в виде набора выборок из этого полного лога, где каждая выборка состоит из полного перечня операций, относящихся к конкретной геометрической области.A complete log of all operations can be stored as a set of samples from this complete log, where each sample consists of a complete list of operations related to a particular geometric area.

Каждое устройство может хранить у себя информацию о каждой области пространства и может включать перечень всех подключенных к сообществу (графу) устройств, имеющих координаты в этой же (своей) данной области пространства.Each device can store information about each region of space and may include a list of all devices connected to the community (graph) that have coordinates in the same (own) given region of space.

Устройства, имеющие координаты внутри геометрической области, могут передавать другим устройствам, имеющим координаты внутри этой же области и/или в прилегающих областях, информацию в процессе записи.Devices having coordinates within a geometric region can transmit information to other devices having coordinates within the same region and/or adjacent regions during the recording process.

Информацию (транзакцию) затрагивающую текущую область устройство-инициатор (устройство-источник) может записывать в локальную память (средство хранения) первоначально в статусе "не согласована", затем устройство-инициатор (устройство-источник) рассылать информацию прямо или посредством пересылки всем "соседям" - остальным устройствам, имеющим координаты в той же области, что и устройство-инициатор (устройство-источник) и в смежных областях, и указанной информации устройство-инициатор (устройство-источник) может назначать статус "согласована" после того, как все остальные устройства из той же и смежных областей пришли к "консенсусу" (см. https://en.wikipedia.org/wiki/Consensus (computer science)) о том, что запись (транзакция) успешно зарегистрирована, т.е. получена всеми устройствами-адресатами.The initiating device (source device) can write information (transaction) affecting the current area to local memory (storage medium) initially in the "inconsistent" status, then the initiating device (source device) can send information directly or by sending it to all "neighbors" " - other devices having coordinates in the same area as the initiating device (source device) and in adjacent areas, and the specified information, the initiating device (source device) can assign the status "negotiated" after all the others devices from the same and related areas have come to a "consensus" (see https://en.wikipedia.org/wiki/Consensus (computer science)) that the record (transaction) has been successfully registered, i.e. received by all destination devices.

При обмене сообщениями между устройствами ими может осуществляться ассиметричное шифрование сообщений (см. например, https://docs.cntd.ru/document/1200004855).When exchanging messages between devices, they can perform asymmetric message encryption (see, for example, https://docs.cntd.ru/document/1200004855).

При обмене сообщениями между устройствами сообщения могут снабжать подписью, позволяющей гарантировать подлинность сообщений.When messages are exchanged between devices, the messages may be signed to ensure the authenticity of the messages.

Каждое устройство может хранить у себя информацию о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами касательно своей и смежных областей.Each device can store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices regarding its own and adjacent areas.

Новую информацию (транзакцию) о своей области возможно записывать в локальную память (средство хранения) устройства сразу в статусе "принята".It is possible to write new information (transaction) about its area to the local memory (storage medium) of the device immediately in the "accepted" status.

При этом каждое устройство может отслеживать все изменения (транзакции), вносимые другими устройствами, имеющими координаты в той же области, где находится устройство, и в смежных областях, а также может периодически рассылать всем соседним устройствам информацию о том, какая транзакция была записана этим устройством последней или информацию о том, что запись не осуществлялась.At the same time, each device can track all changes (transactions) made by other devices that have coordinates in the same area where the device is located and in adjacent areas, and can also periodically send information to all neighboring devices about which transaction was recorded by this device. last or information that the recording was not carried out.

Каждое устройство может отслеживать полноту своего лога операций и запрашивает пропущенные транзакции, если этому устройству о них станет известно опосредованно, либо обновляет для себя информацию об операции, перед которой этому устройству все операции известны.Each device can keep track of the completeness of its log of operations and requests missed transactions if this device becomes aware of them indirectly, or updates information about the operation for itself, before which all operations are known to this device.

Каждая процедура записи данных в область может включать следующие шаги. Запись в локальную память (средство хранения) одного устройства. Назначение этим устройством записи статуса "не согласована". Рассылку записывающим данные устройством (прямую или посредством пересылки) данных другим устройствам в этой же области и в смежных областях. Получение ответа от всех устройств в пределах измененной области и смежных областей, что данные приняты (согласованы). Назначение записи статуса "согласована".Each procedure for writing data to an area may include the following steps. Writing to the local memory (storage medium) of a single device. The assignment of this device to the entry status "inconsistent". Sending data (directly or by forwarding) by a recording device to other devices in the same area and adjacent areas. Receiving a response from all devices within the changed area and adjacent areas that the data is accepted (negotiated). The purpose of the status record is "approved".

Информацию (транзакцию) о текущей области возможно записывать в локальную память (средство хранения) устройства сразу в статусе "принята". А затем уже оповещать о ней другие устройствам в этой же области и в смежных областяхInformation (transaction) about the current area can be written to the local memory (storage medium) of the device immediately in the "accepted" status. And then notify other devices in the same area and in adjacent areas about it

Может существовать одно и более устройство с функциями сервера для первичной авторизации устройств, проксирования информации и организации Р2Р взаимодействия между агентами (например, для организации UDP/IP punch hole), не принадлежащее сообществу и не имеющему координат в указанном n-мерном пространстве.There may be one or more devices with server functions for primary authorization of devices, proxying information and organizing P2P interaction between agents (for example, for organizing a UDP / IP punch hole), which does not belong to the community and does not have coordinates in the specified n-dimensional space.

Любое из устройств при подключении к сообществу (рою) может проходить процедуру авторизации.Any of the devices, when connected to a community (swarm), can go through the authorization procedure.

Любому из устройств могут быть назначены дополнительно более широкие или урезанные права доступа к данным, расширенные или сокращенные обязанности, другие доп. обязанности или ограничения по равнению с другими устройствами-участниками сообщества.Any of the devices can be assigned additionally broader or truncated data access rights, extended or reduced responsibilities, and other additional. responsibilities or restrictions in relation to other devices in the community.

Заявлена динамическая система сбора, обработки и размещения информации об n-мерном пространстве.A dynamic system for collecting, processing and placing information about an n-dimensional space is claimed.

Система включает:The system includes:

- n-мерное пространство, предварительно разделенное на геометрические области,- n-dimensional space, previously divided into geometric regions,

- одно или более устройство, которому присвоены координаты в n-мерном пространстве, снабженное одним или более средством сбора информации, средством хранения информации, средством связи (приема и передачи) с другими устройствами, с возможностью перемещения как внутри одной геометрической области, так и на любую из смежных геометрических областей, причем указанная информация, содержит в том числе логический адрес каждого такого устройства.- one or more devices assigned coordinates in n-dimensional space, equipped with one or more means of collecting information, means of storing information, means of communication (reception and transmission) with other devices, with the ability to move both within one geometric area and on any of the adjacent geometric regions, and the specified information contains, among other things, the logical address of each such device.

Средство хранения информации может дополнительно включать средство хранения статуса информации, частичный лог общего распределенного лога транзакций.The information storage means may further include an information status storage means, a partial log of the general distributed transaction log.

В частичном логе операций (DLT https://en.wikipedia.org/wiki/Distributed ledger) каждой операцией могут изменяться данные только о заранее фиксированном наборе указанных выделенных областей n-мерного пространства.In the partial log of operations (DLT https://en.wikipedia.org/wiki/Distributed ledger), each operation can change data only about a pre-fixed set of specified selected areas of the n-dimensional space.

Полный лог всех операций может храниться в виде набора выборок из этого полного лога, и каждая указанная выборка состоит из полного перечня операций, относящихся к конкретной геометрической области.A complete log of all operations can be stored as a set of samples from this complete log, and each specified sample consists of a complete list of operations related to a particular geometric region.

В логическом адресе каждого фрагмента информации (каждой записи в БД) может присутствовать уникальный идентификатор, однозначно определяющий область, к которой принадлежит данная запись.The logical address of each piece of information (each record in the database) may contain a unique identifier that uniquely identifies the area to which the record belongs.

Информация о каждой области пространства может включать перечень всех подключенных к сообществу (графу) устройств, имеющих координаты в данной области.Information about each area of space may include a list of all devices connected to the community (graph) that have coordinates in this area.

Новая информация (транзакция) о текущей области может быть записана в локальную память (средство хранения) устройством - инициатором (устройством - источником) первоначально в статусе "не согласована", затем после подтверждения - в статусе "согласована".New information (transaction) about the current area can be written to the local memory (storage medium) by the initiating device (source device) initially in the "not agreed" status, then after confirmation - in the "agreed" status.

В локальной памяти (средстве хранения) каждого устройства может храниться информация о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами для своей и смежных областей.The local memory (storage medium) of each device may store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices for its own and adjacent areas.

Информация (транзакция) о текущей области может быть записана в локальную память (средство хранения) устройство-инициатор (устройство-источник) первоначально в статусе "принята".Information (transaction) about the current area can be written to the local memory (storage medium) of the initiator device (source device) initially in the "accepted" status.

Возможно дополнительно наличие одного и более устройства с функциями сервера для первичной авторизации устройств, проксирования информации и организации Р2Р взаимодействия между агентами (например, для организации UDP/IP punch hole), не принадлежащее сообществу и не имеющему координат в указанном n-мерном пространстве.It is possible to additionally have one or more devices with server functions for primary authorization of devices, proxying of information and organization of P2P interaction between agents (for example, for organizing a UDP/IP punch hole) that does not belong to the community and does not have coordinates in the specified n-dimensional space.

Заявлен программный продукт, размещенный на компьютерном читаемом устройстве хранения, для сбора, хранения, обмена, перемещения контента в топологической области n-мерного пространства, компьютерно читаемое устройство хранения, содержащее программный код, позволяющий (заставляющий) компьютер выполнять следующие действия: собирать информацию информации средствами сбора, находящимися на устройствах, имеющих координаты в описываемом пространстве, размещение информации, относящейся к топологической области, на средствах хранения информации, расположенных на указанных устройствах, имеющих в этот момент координаты в пределах этой области, обмен информацией с устройствами имеющими координаты в этой или других, преимущественно смежных, областях.A software product placed on a computer-readable storage device for collecting, storing, exchanging, moving content in a topological region of n-dimensional space is claimed, a computer-readable storage device containing a program code that allows (forces) a computer to perform the following actions: collect information information by means of collection located on devices having coordinates in the described space, placing information related to the topological area on information storage facilities located on the indicated devices that have coordinates within this area at that moment, information exchange with devices having coordinates in this or other , mostly adjacent areas.

Дополнительно указанный программный продукт может позволять компьютерному устройству, имеющему координаты внутри топологической области, передавать другим устройствам, имеющим координаты внутри этой же области и смежных областях, информацию в процессе записи.Additionally, said software product may allow a computer device having coordinates within the topological region to transmit information to other devices having coordinates within the same region and adjacent regions during recording.

Дополнительно указанный программный продукт может позволять компьютерному устройству выполнять процедуры записи данных внутри области в следующем порядке:Additionally, said software product may allow the computing device to perform procedures for writing data within an area in the following order:

- первичную запись в локальную память (средство хранения) одного устройства,- primary recording in the local memory (storage medium) of one device,

- назначение первичной записи статуса "не согласована",- assignment of the primary record of the status "not agreed",

- рассылку (прямую или посредством пересылки) данных другим устройствам в этой же области (соседям) по области и в смежных областях,- distribution (direct or by forwarding) of data to other devices in the same area (neighbors) in the area and in adjacent areas,

- получение ответа от всех соседних (в пределах области и смежных областей) устройств в пределах области и смежных областей, что данные приняты,- receiving a response from all neighboring (within the area and adjacent areas) devices within the area and adjacent areas that the data has been received,

- назначение первичной записи статуса "согласована".- assignment of the primary record of the status "approved".

Дополнительно указанный программный продукт может позволять компьютерному устройству выполнять процедуры записи данных внутри области в следующем порядке:Additionally, said software product may allow the computing device to perform procedures for writing data within an area in the following order:

• каждому устройству хранить у себя информацию о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами в сообществе для своей и смежных областей;• each device to store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices in the community for its own and adjacent areas;

• каждому устройству записывать в локальную память (средство хранения) устройства в статусе "принята" новую информацию о своей области;• each device to write to the local memory (storage medium) of the device in the "accepted" status new information about its area;

• каждому устройству отслеживать все изменения, вносимые другими устройствами, имеющими координаты в той же области, где находится устройство, и в смежных областях? а также периодически рассылать всем соседним устройствам информацию о том, какая транзакция была записана этим устройством последней или информацию о том, что запись не осуществлялась;• each device to keep track of all changes made by other devices that have coordinates in the same area where the device is located and in adjacent areas? and also periodically send to all neighboring devices information about which transaction was recorded by this device last or information that the recording was not carried out;

• каждому устройству отслеживать полноту своего лога операций и запрашивать пропущенные транзакции, если о них узнает, либо обновлять для себя информацию об операции, перед которой этому устройству все операции известны;• each device monitors the completeness of its log of operations and request missed transactions if it learns about them, or update information about the operation for itself, before which all operations are known to this device;

• каждому устройству отслеживать полноту своего лога операций и запрашивать пропущенные транзакции, если о них узнает, либо обновлять для себя информацию об операции, перед которой этому устройству все операции известны.• each device should keep track of the completeness of its log of operations and request missed transactions if it learns about them, or update information about the operation for itself, before which all operations are known to this device.

Заявлена также размещенная на компьютере система для обмена, хранения, доставки информации в области n-мерного пространства включающая информационную шину, присоединенный к инф. шине процессор, устройство сбора информации, устройство памяти (хранения информации), содержащее инструкции для сбора информации, обмена данными с другими устройствами, находящимися в n-мерном пространстве.A computer-based system for exchanging, storing, and delivering information in an n-dimensional space is also claimed, including an information bus connected to inf. bus processor, information collection device, memory device (information storage), containing instructions for collecting information, exchanging data with other devices located in the n-dimensional space.

Также размещенная на компьютере система для обмена, хранения, доставки информации в области n-мерного пространства включающая информационную шину, присоединенный к инф. шине процессор, устройство сбора информации, устройство памяти (хранения информации), может дополнительно содержать инструкции устройствам, имеющим координаты внутри топологической области передавать другим устройствам, имеющим координаты внутри этой же области и смежных областях, информацию в процессе записи.Also placed on a computer system for the exchange, storage, delivery of information in the area of n-dimensional space, including an information bus attached to inf. On the bus, a processor, an information collection device, a memory (information storage) device, may additionally contain instructions for devices having coordinates within the topological area to transfer information to other devices having coordinates inside the same area and adjacent areas during the recording process.

Также размещенная на компьютере система для обмена, хранения, доставки информации в области n-мерного пространства включающая информационную шину, присоединенный к инф. шине процессор, устройство сбора информации, устройство памяти (хранения информации) может дополнительно содержать инструкции назначить первоначально статус "не согласована" ("на согласовании"), информации (транзакции), которую агент записал в свою локальную память (средство хранения) области, указанной информации впоследствии назначить статус "согласована" (в том числе агенту-автору) только после того, как все обитатели области и смежных областей приняли и подтвердили агенту-инициатору ее получение.Also placed on a computer system for the exchange, storage, delivery of information in the area of n-dimensional space, including an information bus attached to inf. bus processor, information collection device, memory device (storage of information) may additionally contain instructions to initially assign the status "inconsistent" ("in agreement"), the information (transaction) that the agent wrote to its local memory (storage medium) of the area specified information subsequently assign the status "approved" (including the agent-author) only after all the inhabitants of the area and adjacent areas have accepted and confirmed to the agent-initiator its receipt.

Также размещенная на компьютере система для обмена, хранения, доставки информации в области n-мерного пространства включающая информационную шину, присоединенный к инф. шине процессор, устройство сбора информации, устройство памяти (хранения информации) может дополнительно содержать инструкции, что каждая процедура записи данных в область состоит из:Also placed on a computer system for the exchange, storage, delivery of information in the area of n-dimensional space, including an information bus attached to inf. bus processor, information collection device, memory (information storage) device may additionally contain instructions that each procedure for writing data to the area consists of:

- первичной записи в локальную память (средство хранения) одного устройства,- primary recording in the local memory (storage medium) of one device,

- назначения первичной записи статуса "не согласована",- assignment of the primary record of the status "inconsistent",

- рассылки (прямой или посредством пересылки) данных другим устройствам в этой же области (соседям) по области в смежных областях,- distribution (direct or by forwarding) of data to other devices in the same area (neighbors) by area in adjacent areas,

- получения ответа от всех соседних (в пределах области и смежных областей) устройств в пределах области и смежных областей, что данные приняты,- receiving a response from all neighboring (within the area and adjacent areas) devices within the area and adjacent areas that the data has been received,

- назначения первичной записи статуса "согласована".- assignment of the primary record of the status "agreed".

Также размещенная на компьютере система для обмена, хранения, доставки информации в области n-мерного пространства включающая информационную шину, присоединенный к инф. шине процессор, устройство сбора информации, устройство памяти (хранения • каждому устройству хранить у себя информацию о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами в сообществе для своей и смежных областей;Also placed on a computer system for the exchange, storage, delivery of information in the area of n-dimensional space, including an information bus attached to inf. bus processor, information collection device, memory (storage) device • each device to store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all operations performed by all devices in the community for its own and adjacent areas;

• каждому устройству хранить у себя информацию о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами в сообществе для своей и смежных областей;• each device to store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices in the community for its own and adjacent areas;

• каждому устройству записывать в локальную память (средство хранения) устройства в статусе "принята" новую информацию о своей области;• each device to write to the local memory (storage medium) of the device in the "accepted" status new information about its area;

• каждому устройству отслеживать все изменения, вносимые другими устройствами, имеющими координаты в той же области, где находится устройство, и в смежных областях? а также периодически рассылать всем соседним устройствам информацию о том, какая транзакция была записана этим устройством последней или информацию о том, что запись не осуществлялась;• each device to keep track of all changes made by other devices that have coordinates in the same area where the device is located and in adjacent areas? and also periodically send to all neighboring devices information about which transaction was recorded by this device last or information that the recording was not carried out;

• каждому устройству отслеживать полноту своего лога операций и запрашивать пропущенные транзакции, если о них узнает, либо обновлять для себя информацию об операции, перед которой этому устройству все операции известны.• each device should keep track of the completeness of its log of operations and request missed transactions if it learns about them, or update information about the operation for itself, before which all operations are known to this device.

ДОПОЛНИТЕЛЬНЫЕ РАЗЪЯСНЕНИЯ ПО ТЕМЕ.ADDITIONAL EXPLANATION ON THE TOPIC.

Тип используемой в заявляемом способе базы данных - может быть разным, но лучший результат получается с БД типа "Ключ-Значение" (https://en.wikipedia.org/wiki/Key%E2%80%93value database) с поддержкой иерархической адресации или без. В базах такого типа "Ключ" - это последовательность байт произвольной длины, "адрес", "Значение" - сохраняемые данные произвольного типа, последовательность байт произвольной длины.The type of database used in the claimed method may be different, but the best result is obtained with a "Key-Value" type database (https://en.wikipedia.org/wiki/Key%E2%80%93value database) with support for hierarchical addressing or without. In databases of this type, "Key" is a sequence of bytes of arbitrary length, "address", "Value" - stored data of arbitrary type, a sequence of bytes of arbitrary length.

Каждый "Ключ" БД содержит (однозначно вычисляемый или явно хранимый в виде последовательности из N целых чисел) адрес области в N-мерном пространстве. При этом к одной области могут относиться множество различных ключей.Each "Key" of the database contains (uniquely calculated or explicitly stored as a sequence of N integers) the address of the area in the N-dimensional space. In this case, many different keys can belong to one area.

Любая БД/язык программирования предлагает множество операций над данными. Из этого множества операций для заявляемой БД применимы только те, что соответствуют приведенным ниже критериям, что несколько сужает стандартное значение выражения "операция над данными".Any database/programming language offers many data operations. Of this set of operations for the claimed database, only those that meet the criteria below are applicable, which somewhat narrows the standard meaning of the expression "data operation".

Так же у предлагаемой БД есть ограничения по характеристикам выполняемых задач. Это означает, что предлагаемая БД не дает преимущества при решении задач, где отсутствует зона обзора, привязка к области (в n-мерном пространстве) и клиент может равновероятно читать/писать вообще любые данные. Неограниченное масштабирование БД без линейного роста нагрузки на сеть и вычислительные ресурсы проявит себя только на задачах, бизнес-логика которых соответствует приведенным критериям.Also, the proposed database has limitations on the characteristics of the tasks performed. This means that the proposed database does not provide an advantage in solving problems where there is no viewing area, binding to an area (in n-dimensional space) and the client can read / write any data with equal probability. Unlimited database scaling without a linear increase in the load on the network and computing resources will manifest itself only on tasks whose business logic meets the above criteria.

Описывают N-мерное пространство, всем данным присваивают координаты в этом пространстве, потом пространство разбивают на сегменты (топологическое замощение N-мерной поверхности). Далее обрабатывают данные каждого сегмента (каждой плитки) отдельно. Топологические термины "замощения", "мозаики", "паркеты" описывают процедуру применяемой сегментации пространства.An N-dimensional space is described, all data are assigned coordinates in this space, then the space is divided into segments (topological tiling of an N-dimensional surface). Further, the data of each segment (each tile) is processed separately. The topological terms "tilings", "mosaics", "parquets" describe the procedure for the applied space segmentation.

Области (сегменты) БД образуют дискретное N-мерное пространство, и обладают стандартными топологическими свойствами "соседства", т.е. каждая одна область соседствует с одной или несколькими другими, и "удаленности", т.е. может быть вычислена сравнительная дистанция между любыми областями в N-мерном пространстве.Areas (segments) of the database form a discrete N-dimensional space, and have the standard topological properties of "neighborhood", i.e. each one area is adjacent to one or more others, and "remoteness", i.e. the comparative distance between any regions in N-dimensional space can be calculated.

Информацию о каждой области хранят в памяти ЭВМ и обновляют независимо от других областей.Information about each area is stored in the computer memory and updated independently of other areas.

Для изменения записи в БД используют специальные последовательности байт - "операции". Операция - это набор данных, описывающих вносимые в БД изменения (тип операции, адрес данных, новое значение и т.д.). Ближайший аналог - SQL запрос, но не все операции, доступные в SQL, годятся для заявляемой БД.To change a record in the database, special byte sequences are used - "operations". An operation is a set of data describing the changes made to the database (operation type, data address, new value, etc.). The closest analogue is a SQL query, but not all operations available in SQL are suitable for the claimed database.

Подходят только операции, соответствующие следующим критериям:Only transactions that meet the following criteria are eligible:

• операция описывает изменения в фиксированном наборе областей,• operation describes changes in a fixed set of areas,

• перечень затронутых операцией областей не зависит от состояния БД,• the list of areas affected by the operation does not depend on the state of the database,

• операция должна описывать детерминистические изменения и при исполнении на идентичной БД всегда давать идентичный результат,• the operation must describe deterministic changes and, when executed on an identical database, always give an identical result,

• операция должна быть "обратима", то есть для каждой операции должна существовать "обратная" операция (операция "отмены", обратная функция), применение которой после операции вернет БД к состоянию "до начала выполнения операции",• the operation must be "reversible", that is, for each operation there must be a "reverse" operation ("cancel" operation, inverse function), the use of which after the operation will return the database to the state "before the start of the operation",

• операция атомарна, т.е. может либо быть целиком успешно применена к БД, либо полностью "провалиться", частичный вариант недопустим. Успешная операция может осуществить запись в БД, провалившаяся операция оставляет БД неизменной.• the operation is atomic, i.e. can either be completely successfully applied to the database, or completely "fail", a partial version is not allowed. A successful operation can write to the database, a failed operation leaves the database unchanged.

Операции объединяют в "транзакцию". Транзакция, как понимается в данном документе, а также в общепринятой практике - это упорядоченный список из одной и более операций. Транзакция наследует все свойства отдельной операции, включая атомарность. Транзакция, как набор данных, помимо списка включенных операций, содержит служебную информацию включая, но не ограничиваясь, время создания, создателя транзакции, электронную подпись. Транзакция, как и операция, может быть "применена" к БД.Operations are combined into a "transaction". A transaction, as understood in this document, as well as in common practice, is an ordered list of one or more transactions. A transaction inherits all the properties of a single operation, including atomicity. A transaction, as a set of data, in addition to the list of included operations, contains service information including, but not limited to, the time of creation, the creator of the transaction, and the electronic signature. A transaction, like an operation, can be "applied" to a database.

Транзакции, применяемые к БД, помещаются в "лог транзакций": однозначно упорядоченный по фиксированным правилам список транзакций. Удобно упорядочивать транзакции в логе сортировкой по убыванию по уникальному сочетанию времени создания транзакции и ID создателя.Transactions applied to the database are placed in the "transaction log": a list of transactions uniquely ordered according to fixed rules. It is convenient to sort transactions in the log in descending order according to the unique combination of the creation time of the transaction and the ID of the creator.

Опираясь на однозначную сортировку транзакций, пользователи БД помещают в лог новые транзакции в произвольной очередности. Благодаря тому, что порядок транзакций в логе зависит только от описания транзакций, а не от очередности их добавления, из идентичного перечня транзакций на выходе всегда будет получаться идентичный лог.Based on the unique sorting of transactions, database users put new transactions in the log in an arbitrary order. Due to the fact that the order of transactions in the log depends only on the description of the transactions, and not on the order in which they were added, an identical log will always be obtained from an identical list of transactions at the output.

ЗАДАЧИ, КОТОРЫЕ РЕШАЕТ БАЗА ДАННЫХTASKS THAT THE DATABASE SOLVES

Решается задача, когда в некотором пространстве, предварительно разделенном на области, множество независимых агентов - устройств, одновременно и несогласованно читают и записывают информацию в единую базу данных (далее "БД"). Агенты могут выполнять, например, такие задачи:The problem is solved when in a certain space, previously divided into regions, many independent agents - devices, simultaneously and inconsistently read and write information to a single database (hereinafter referred to as the "DB"). Agents can perform, for example, the following tasks:

• Автомобили (агенты) при движении по дороге с помощью датчиков анализируют дорожную обстановку и помещают в БД информацию о встреченных помехах, качестве дорожного полотна, припаркованных автомобилях, собственном местоположении и другие сведения, полезные для других автомобилей и/или для систем управления движением. Также каждый автомобиль считывает из БД информацию, записанную другими автомобилями, для поиска свободных парковок, выбора режима движения и т.п.• Cars (agents) when driving on the road using sensors analyze the traffic situation and put into the database information about the obstacles encountered, the quality of the roadway, parked cars, their own location and other information useful for other cars and/or for traffic control systems. Also, each car reads from the database information recorded by other cars to search for free parking lots, select a driving mode, etc.

• Боевые машины и бойцы на поле боя, подключившись к базе с информацией о территории, следят за позициями друг друга и выявленными враждебными целями, загружают в базу информацию о собственной позиции, наблюдаемых объектах, помещают метки для артиллерийских ударов или передают указания беспилотным аппаратам.• Combat vehicles and fighters on the battlefield, having connected to the base with information about the territory, monitor each other's positions and identified hostile targets, upload information about their own position, observed objects to the database, place marks for artillery strikes or transmit instructions to unmanned vehicles.

• Участники компьютерной игры, подключившись к общей игровой базе, совершают конкурентные действия в игровой вселенной - перемещаются в пространстве (обновляют запись "позиция в пространстве космического корабля №1"), наносят урон другим игрокам (обновляют запись "очки прочности корабля №2" других игроков) и игровым объектам, создают и/или уничтожают постройки, обмениваются предметами с другими игроками и прочее.• Participants of a computer game, having connected to a common game base, perform competitive actions in the game universe - move in space (update the record "position in space of the spaceship No. 1"), inflict damage on other players (update the record "Ship No. players) and game objects, create and/or destroy buildings, exchange items with other players, etc.

Вышеописанные ситуации характеризуются следующими ключевыми особенностями:The situations described above are characterized by the following key features:

1. БД описывает размещенные в n-мерном пространстве объекты, т.е. база хранит описания объектов. Размерность такого пространства может быть любой, главное, чтобы пространство однозначно разбивалось на, желательно, непересекающиеся топологические (геометрические, топографические) области (или просто "области") и для каждой такой области пространства можно было бы найти конечное число соседних областей. В простейшем случае это фрагмент плоскости (область на местности), разбитый на квадраты (например, 1 км × 1 км). В качестве примеров собираемой в области информации:1. The database describes the objects located in the n-dimensional space, i.e. the database stores descriptions of objects. The dimension of such a space can be any, the main thing is that the space is uniquely divided into, preferably, non-intersecting topological (geometric, topographic) regions (or simply "regions"), and for each such region of space one could find a finite number of neighboring regions. In the simplest case, this is a fragment of a plane (an area on the ground), divided into squares (for example, 1 km × 1 km). As examples of information collected in the area:

• Размещение и свойства построек, растительности и дорог на местности (карту местности можно рассматривать, как двухмерное пространство)• Placement and properties of buildings, vegetation and roads in the area (a map of the area can be viewed as a two-dimensional space)

• В компьютерной игре размещение игроков и внутриигровых объектов на игровом поле (двумерном или трехмерном)• In a computer game, the placement of players and in-game objects on the playing field (2D or 3D)

• Положение звезд и звездных систем во вселенной (трехмерное пространство).• Position of stars and star systems in the universe (three-dimensional space).

2. Агент, осуществляющий доступ к базе данных (будь то запись или чтение), имеет относительно устойчивую и явно очерченную зону интереса - перечень топологических областей (часто соприкасающихся друг с другом, но не обязательно). Зона интереса может быть произвольной формы и размера (наиболее часто можно ожидать n-мерную сферу). Относительно устойчивая зона интереса подразумевает, что подавляющее большинство операций чтения/записи ведется без изменения зоны интереса, а операции изменения зоны интереса проводятся редко. Чем меньше операций смены зоны интереса на одну операцию чтения/записи, тем больший выигрыш по производительности и используемым ресурсам ЭВМ дает предлагаемая архитектура. В качестве примеров, иллюстрирующих зону интереса, можно привести следующие:2. The agent accessing the database (be it writing or reading) has a relatively stable and clearly defined area of interest - a list of topological areas (often in contact with each other, but not necessarily). The zone of interest can be of arbitrary shape and size (most often an n-dimensional sphere can be expected). A relatively stable area of interest means that the vast majority of read/write operations are performed without changing the area of interest, and changes to the area of interest are rarely performed. The fewer operations of changing the area of interest per one read/write operation, the greater the gain in performance and used computer resources gives the proposed architecture. Examples that illustrate the area of interest include the following:

• Автомобиль, ищущий место для парковки, нуждается в информации о свободных парковках в радиусе ~500 м,• A car looking for a parking space needs information about free parking lots within a radius of ~500 m,

• Наводчику БМП (боевая машина пехоты) полезно знать о позициях ПЗРК (зенитно-ракетный комплекс) в радиусе нескольких (например, 4-х) километров. Что происходит на дистанции далее 4-х км (для примера) уже не так важно, но полезно. За пределами радиуса 10 км информация не нужна.• It is useful for the BMP (infantry fighting vehicle) gunner to know about the positions of the MANPADS (anti-aircraft missile system) within a radius of several (for example, 4) kilometers. What happens at a distance further than 4 km (for example) is no longer so important, but useful. Outside a radius of 10 km, information is not needed.

• Игрок в компьютерной игре может торговать и обмениваться ударами только с игроками и неигровыми персонажами в непосредственной близости от себя, как правило в поле своего зрения. На достаточно обширной игровой карте зона, "видимая" игроку в каждый момент времени, может составлять доли процента от общей игровой территории• A player in a computer game can only trade and trade with players and NPCs in their immediate vicinity, usually within their line of sight. On a sufficiently large game map, the zone "visible" to the player at any given time can be a fraction of a percent of the total game area.

• Зону интереса определяют в каждом случае индивидуально, например игрок, подключившийся в сетевую игру с полноценного компьютера, может иметь большую зону видимости, чем игроки, подключившиеся с мобильных телефонов, а машина, не нашедшая парковку в радиусе 200 метров, может расширить область обзора парковок до 4 00 или 600 метров.• The zone of interest is determined in each case individually, for example, a player who has connected to a network game from a full-fledged computer can have a larger visibility zone than players who have connected from mobile phones, and a car that has not found a parking lot within a radius of 200 meters can expand the field of view of parking lots up to 400 or 600 meters.

• С базой может работать и агент, чья зона интереса покрывает всю БД. Например, штаб дивизии, имея мощный компьютер и сети связи, может собирать информацию с обширной территории, в то время, как бойцу может быть остаточно доступа к небольшому фрагменту радиусом в полтора километра.• An agent whose zone of interest covers the entire database can also work with the database. For example, a division headquarters, having a powerful computer and communication networks, can collect information from a vast territory, while a fighter may have access to a small fragment with a radius of one and a half kilometers.

3. Каждая операция чтения или записи гарантированно и однозначно может быть соотнесена с определенной областью пространства, описанного в БД. Поэтому каждая серия операций также будет иметь конечный список затронутых областей. Глобальные операции (распространяющиеся на все области одновременно) либо вовсе не используют, либо являются исключением (их выполняют посредством иного инструментария, не описываемого здесь).3. Each read or write operation can be guaranteed and unambiguously correlated with a certain area of the space described in the database. Therefore, each series of operations will also have a finite list of affected areas. Global operations (applying to all areas simultaneously) are either not used at all or are an exception (they are performed using other tools not described here).

• Если машина отчитывается о занятом парковочном месте, это означает, что точно известна локация парковочного места, и какую "область карты" нужно обновить, а какие области (все остальные области) останутся неизменными.• If the car reports a occupied parking space, it means that the exact location of the parking space is known, and which "map area" needs to be updated, and which areas (all other areas) will remain unchanged.

• Если игроку нужен перечень всех аватаров других игроков (участников) в определенном радиусе от его аватара, то возможно точно определить конечный перечень областей "на карте", то есть разделов БД, которые необходимо и достаточно осмотреть, чтобы получить исчерпывающий перечень соседних аватаров.• If a player needs a list of all the avatars of other players (participants) within a certain radius from his avatar, then it is possible to accurately determine the final list of areas "on the map", that is, the sections of the database that are necessary and sufficient to examine in order to obtain an exhaustive list of neighboring avatars.

4. Данные и/или изменение происходящие вне "зоны интереса" данных, агенту (устройству) не нужны. Это так же означает, что изменения, вносимые в БД агентом, не требуются другим агентам, чья зона интереса не покрывает изменяемую область. Фактически, в каждый момент времени каждый агент работает с "выделенным фрагментом" базы, при этом остальная база существует полностью вне зоны его видимости.4. Data and/or changes occurring outside the data "zone of interest" are not needed by the agent (device). It also means that changes made to the database by an agent are not required by other agents whose area of interest does not cover the area being changed. In fact, at every moment of time, each agent works with a "selected fragment" of the base, while the rest of the base exists completely outside its visibility zone.

• Встроенный компьютер автомобиля или мобильный телефон с приложением не сможет обработать дорожную обстановку в целом городе, но загрузить по мобильной сети и обработать состояние парковок в радиусе 1 километра можно, и не имея существенных вычислительных и сетевых ресурсов.• The car's built-in computer or a mobile phone with an application will not be able to process the traffic situation in the whole city, but it is possible to download over the mobile network and process the state of parking lots within a radius of 1 kilometer without having significant computing and network resources.

• Игроки, активно генерирующие события (аватар переместился туда, аватар переместился сюда), все вместе создают гигантский объем трафика. Обрабатывать в реальном времени все события игровой вселенной, где одновременно играет несколько сотен или тысяч игроков, на обычном компьютере невозможно. Ни пропускной способности стандартного подключения к сети Интернет не хватит, ни вычислительных ресурсов. Но если компьютер игрока будет получать информацию только о событиях по соседству (а другие игроку и не нужны), то и принять по сети такие данные и обработать их возможно существенно меньшими ресурсами.• Players that are actively generating events (avatar moved there, avatar moved here) collectively generate a huge amount of traffic. It is impossible to process in real time all the events of the game universe, where several hundreds or thousands of players are playing at the same time, on a conventional computer. Neither the bandwidth of a standard Internet connection will be enough, nor the computing resources. But if the player's computer receives information only about events in the neighborhood (and the player does not need others), then it will receive such data over the network and process it with significantly fewer resources.

5. Агенты имеют возможность (самостоятельно или по воле других авторизованных агентов) изменять "зону интереса". Крайне важна реализация, при которой зона интереса храниться прямо в БД, обновляется там же агентами (возможно, назначенными авторизованными агентами) и публична, то есть агенты будут информированы о зоне интереса друг друга, что открывает широкие возможности оптимизации.5. Agents have the ability (on their own or at the behest of other authorized agents) to change the "zone of interest". The implementation is extremely important, in which the area of interest is stored directly in the database, updated there by agents (possibly appointed by authorized agents) and public, that is, the agents will be informed about each other's area of interest, which opens up wide optimization opportunities.

• По мере того, как машина движется по городу, необходимость в обзоре и сборе/обработке информации одной области пропадает, но возникает необходимость осмотреть (собирать/обрабатывать информацию) другую область.• As the car moves through the city, the need to view and collect/process information from one area disappears, but it becomes necessary to view (collect/process information) another area.

• Игрок (агент) может перемещаться по игровому миру: в данный момент ему нужно видеть северную сторону континента и противников на ней, через пять минут - восточную, а потом он полетит в космос. Или игрок может, например, сменить оружие "нож" на "снайперская винтовка", что потребует предоставить ему право записи на существенно расширенную область "пространства".• The player (agent) can move around the game world: at the moment he needs to see the northern side of the continent and the opponents on it, in five minutes - the eastern one, and then he will fly into space. Or the player could, for example, change the weapon from "knife" to "sniper rifle", which would require granting him write access to a significantly expanded area of "space".

6. Возможно обеспечить, не обязательно прямую, связь между агентами, чьи "зоны интереса" перекрываются и/или соприкасаются6. It is possible to provide, not necessarily direct, communication between agents whose "zones of interest" overlap and/or touch

• Игроки при посредничестве сервера и/или напрямую, через Р2Р соединения могут обмениваться информацией с игроками, оказавшимися поблизости от них в игровой вселенной.• Players, through the mediation of the server and / or directly, through P2P connections, can exchange information with players who are close to them in the game universe.

• Автомобили могут устанавливать радиосвязь с находящимися поблизости автомобилями напрямую или через, например, сотовые ретрансляторы.• Vehicles can establish radio contact with nearby vehicles either directly or via cellular repeaters, for example.

7. База данных должна иметь встроенные средства контроля доступа и верификации изменений: первичная авторизация пользователя (например, по логину/паролю и/или открытому ключу), определение разных прав на доступ к различным слоям/областям БД разным пользователям и другие стандартные функции управления доступом к БД.7. The database must have built-in access control and change verification tools: primary user authorization (for example, by login/password and/or public key), defining different access rights to different layers/areas of the database for different users, and other standard access control functions to the DB.

• БД городской дорожной сети может предоставлять городской администрации права на позиционирование на карте парковочных мест (запись) и на просмотр позиций запаркованных автомобилей (чтение). Встроенным же компьютерам автомобилей БД позволит перемещать метку своего автомобиля (и только своего) и читать расположение парковочных мест. Устанавливать расположение парковок автомобиль не имеет права.• A city road network database can grant a city administration the right to position parking spaces on a map (write) and view the positions of parked cars (read). The DB will allow the built-in computers of cars to move the label of their car (and only their own) and read the location of parking spaces. The car does not have the right to set the location of parking lots.

• Игроку должно быть доступно изменение скорости и направления движения его аватара, но не аватаров других игроков. Администрация игры будет видеть все области БД, в том числе полностью скрытые от игроков (например, содержимое секретных сундуков, которое можно узнать только подойдя к сундуку вплотную).• The player must be able to change the speed and direction of movement of his avatar, but not the avatars of other players. The game administration will see all areas of the database, including those that are completely hidden from the players (for example, the contents of secret chests, which can be found out only by coming close to the chest).

8. Базе данных необходимо (от базы данных требуется) (должна) полноценно функционировать и сохранять логическую целостность, в том числе и в условиях интенсивных, одновременных и несогласованных обновлений данных в БД множеством участвующих устройств (агентов) (См. также https://en.wikipedia.org/wiki/Database_transation). При этом базе необходимо (от базы данных требуется) оставаться достоверной, защищенной от несанкционированного доступа (безопасной), целостной и доступной всем агентам, то есть предоставлять стандартный для server-based БД (SQL или NoSQL) уровень надежности и отзывчивости.8. The database needs (required from the database) (should) fully function and maintain logical integrity, including under conditions of intensive, simultaneous and inconsistent data updates in the database by many participating devices (agents) (See also https:// en.wikipedia.org/wiki/Database_translation). At the same time, it is necessary (required from the database) to remain reliable, protected from unauthorized access (secure), complete and accessible to all agents, that is, to provide a standard level of reliability and responsiveness for a server-based database (SQL or NoSQL).

• Даже на относительно небольшой парковке машины могут прибывать и убывать ежеминутно. Обстановка на нескольких парковках в мегаполисе может меняться ежесекундно, а данные пятиминутной давности ценности уже не представляют. В масштабах города тысячи машин будут ежесекундно обновлять данные о своей позиции, о занятых парковках и т.д.• Even in a relatively small parking lot, cars can arrive and depart every minute. The situation in several parking lots in a metropolis can change every second, and five-minute-old data is no longer of value. On a citywide scale, thousands of cars will update data on their position, occupied parking lots, etc. every second.

• На поле боя обстановка меняется ежесекундно. Набор видимых объектов, позиции и действия участников столкновения могут меняться крайне стремительно. Бойцы и дроны перемещаются, новые цели выявляются и подавляются, информация об изменениях обстановки может поступать от датчиков, дронов, вводиться вручную, поступать из штаба и т.д.• On the battlefield, the situation changes every second. The set of visible objects, positions and actions of the participants in the collision can change extremely rapidly. Fighters and drones move, new targets are identified and suppressed, information about changes in the situation can come from sensors, drones, be entered manually, come from headquarters, etc.

Дополнительные пояснения следующие. Целостность подразумевает, что (условно) если автомобиль может быть либо на дороге, либо на парковке, то никогда не окажется ситуации, когда тот же автомобиль будет и на дороге, и на парковке. То есть в каждый момент времени автомобиль существует (целостность не нарушена - ничего не выпало) и пребывает в консистентном, адекватном состоянии (либо там, либо там). Достигается за счет репликации и применения не отдельных операций (автомобиль убрать, автомобиль добавить), а за счет транзакций (либо убрать + добавить в базу приедет, либо не приедет ничего, никаких обломков и частичных обновлений).Additional explanations are as follows. Integrity implies that (conditionally) if a car can be either on the road or in the parking lot, then there will never be a situation where the same car will be both on the road and in the parking lot. That is, at each moment of time the car exists (the integrity is not broken - nothing fell out) and is in a consistent, adequate state (either there or there). It is achieved through replication and the use of not individual operations (remove a car, add a car), but through transactions (either remove + add to the database, or nothing will arrive, no wreckage and partial updates).

Таким образом информация не теряется, пока это не сделают намеренно.Thus information is not lost unless it is intentionally done.

Если необходимо область БД сделать рабочей и хранящей данные даже тогда, когда в области не осталось агентов - назначают хранителя "области" принудительно, например в область помещается выделенный "агент", контролируемый сервером, и агент остается в области до тех пор, пока требуется сохранять данные из этой области.If it is necessary to make the database area working and storing data even when there are no agents left in the area, the custodian of the "area" is forcibly appointed, for example, a dedicated "agent" controlled by the server is placed in the area, and the agent remains in the area until it is required to save data from this area.

9. База данных должна полноценно функционировать и сохранять целостность при нарушениях связности отдельных агентов и групп агентов, при произвольном подключении и отключении агентов, в том числе нештатном и/или принудительном. Например, рой "раздающих контент" в BitTorrent (https://en.wikipedia.org/wiki/Glossary_of_BitTorrent_terms#Peer или https://patents.justia.com/assignee/bittorrent-inc) может расширяться или сжиматься, отдельные узлы могут разрывать связь, но рой как целое по-прежнему предоставляет контент.9. The database must fully function and maintain integrity in case of violations of the connectivity of individual agents and groups of agents, with arbitrary connection and disconnection of agents, including abnormal and / or forced ones. For example, a swarm of "content givers" in BitTorrent (https://en.wikipedia.org/wiki/Glossary_of_BitTorrent_terms#Peer or https://patents.justia.com/assignee/bittorrent-inc) can expand or contract, individual nodes can disconnect, but the swarm as a whole still provides content.

• Игрок, подключившийся в игру через мобильную сеть, может иметь неустойчивую связь: спонтанные изменения скорости, потери пакетов, временные обрывы связи, полный обрыв связи. При этом другие игроки не должны получать задержек и/или ошибок.• A player connected to the game via a mobile network may have an unstable connection: spontaneous changes in speed, packet loss, temporary disconnections, complete disconnection. However, other players should not receive delays and / or errors.

• На поле боя любое устройство может быть в любой момент выведено из строя, а связь может быть недоступна из-за помех и повреждений проводных линий. Уцелевшие устройства должны при этом продолжать работать, обмениваться (по возможности) данными, адекватно отображать обстановку по тем данным, которыми они располагают и пытаться восстановить синхронизацию.• On the battlefield, any device can be disabled at any time, and communication may be unavailable due to interference and damage to wire lines. At the same time, the surviving devices should continue to work, exchange (if possible) data, adequately display the situation according to the data that they have and try to restore synchronization.

10. База может состоять из нескольких отдельных "слоев", часть из которых видна одним агентам и невидима для других. Для слоев можно, например, использовать "Тип", как в примере выше.10. The base may consist of several separate "layers", some of which are visible to some agents and invisible to others. For layers, you can, for example, use "Type", as in the example above.

• Грузовые автомобили могут игнорировать места парковок, предназначенных только для легковых машин.• Trucks may ignore car-only parking spaces.

• БПЛА (беспилотный летающий аппарат) может получать только данные, относящиеся к целеуказанию для него, а целеуказания для минометов будут передаваться в другом "слое".• The UAV (unmanned aerial vehicle) can only receive data related to targeting for it, while targeting for mortars will be transmitted in another "layer".

Древовидная база данных и топологическая (топографическая) адресацияTree database and topological (topographic) addressing

Возможно представить предлагаемую базу объектов в виде древовидной структуры, где адрес каждого узла состоит из последовательности токенов, например из чисел. Первое число может обозначать тип данных, например "1 - постройки, 2 - деревья". Затем в адресе последовательность N чисел (для двумерного пространства - два числа) указывает на принадлежность к определенной области в пространстве. Для двумерного пространства получим [/Тип/КоординатаХ/КоординатаУ]. Например, по адресу [/1/3/2] у нас может храниться перечень построек, размещенных на квадратном километре, удаленном на 3 километра к востоку и на два километра к югу от точки 0:0. По адресу [2/3/2] при этом будут храниться деревья на том же квадратном километре 3:2. А по адресу [/1/2/2] в базе будут доступны постройки на соседнем квадратном километре с координатами 2:2 (2:2 прилегает к квадрату 3:2 слева).It is possible to represent the proposed database of objects in the form of a tree structure, where the address of each node consists of a sequence of tokens, for example, numbers. The first number can indicate the type of data, such as "1 - buildings, 2 - trees". Then, in the address, a sequence of N numbers (for two-dimensional space - two numbers) indicates belonging to a certain area in space. For a two-dimensional space, we get [/Type/CoordinateX/CoordinateY]. For example, at [/1/3/2], we might have a list of buildings located on a square kilometer 3 kilometers east and two kilometers south of the 0:0 point. At the address [2/3/2], trees will be stored on the same square kilometer 3:2. And at the address [/1/2/2] in the database, buildings on the next square kilometer with coordinates 2:2 will be available (2:2 is adjacent to the 3:2 square on the left).

Пример размещения объектов на карте и их адресации в БД (фиг. 1).An example of placing objects on the map and addressing them in the database (Fig. 1).

Адресация видаView Addressing

[/Тип/КоординатаХ/КоординатaY/ПорядковыйНомер][/Type/CoordinateX/CoordinateaY/OrdinalNumber]

Адресацию таких "областей пространства" возможно делать разными способами: [/Тип/КоординатаХ/КоординатаУ], [/КоординатаУ/КоординатаХ/Тип] или вообще [/КоординатаУ/КоординатаХ] и т.д. Подойдет любой адрес, соответствующий критериям:Addressing such "regions of space" can be done in different ways: [/Type/CoordinateX/CoordinateY], [/CoordinateY/CoordinateX/Type] or generally [/CoordinateY/CoordinateX], etc. Any address that meets the criteria will do:

1. В адресе любой записи БД должен присутствовать адрес топологической области (например, N-мерный вектор), к которой относится объект1. The address of any database entry must contain the address of the topological area (for example, an N-dimensional vector) to which the object belongs

2. Каждому объекту, хранимому в БД, гарантированно можно сопоставить его топологическую область (желательно, однозначно)2. Each object stored in the database is guaranteed to be associated with its topological area (preferably, unambiguously)

3. Для каждой области можно подобрать адреса всех соседних (прилегающих) областей3. For each region, you can select the addresses of all neighboring (adjacent) regions

Внутри каждой области пространства можно адресовать объекты так же, численно (что дает простую сквозную числовую адресацию вида /#/#/#/#/… для всей базы) либо как-то иначе (вплоть до использования SQL), что немного усложняет реализацию, но в отдельных случаях может оказаться полезно. Глубина ветвления полученного "дерева" (и, соответственно, длина адресов) может быть любой.Within each region of space, you can address objects in the same way, numerically (which gives a simple end-to-end numerical addressing of the form /#/#/#/#/… for the entire database) or in some other way (up to using SQL), which slightly complicates the implementation, but in some cases it can be useful. The branching depth of the resulting "tree" (and, accordingly, the length of the addresses) can be any.

Примеры возможных адресов для полей из такой БД:Examples of possible addresses for fields from such a database:

• [/Тип/КилометрХ/КилометрУ/МиллиметрХ/МиллиметрУ/ПорядковыйНомер]• [/Type/KilometerX/KilometerU/MillimeterX/MillimeterU/OrdinalNumber]

• [/КилометрХ/КилометрТ/Тип/Уникальный1Б]• [/KilometerX/KilometerT/Type/Unique1B]

• [/КилометрХ/КилометрУ/ID Группы/ID Подгруппы/УникальныйID]• [/KilometerX/KilometerU/GroupID/SubgroupID/UniqueID]

Таким образом, возможно разместить в единой древовидной базе описание любой, сколь угодно обширной, "территории", имеющей (желательно однородные) координаты, и адресовать объекты этой базы, зная, к какой области N-мерного пространства они относятся и, зная адрес объекта, устанавливать область, в которой объект хранится.Thus, it is possible to place in a single tree-like database a description of any "territory", arbitrarily large, having (preferably uniform) coordinates, and address the objects of this database, knowing which region of the N-dimensional space they belong to and, knowing the address of the object, set the area in which the object is stored.

Запись на примере БД древовидной адресации, лог транзакцийRecording on the example of a tree-based addressing database, transaction log

Предположим, что БД целиком доступна некоему агенту для чтения и записи. Агент, имея адрес, может читать хранимые в базе объекты (либо удостоверяться, что в базе объекта по указанному адресу нет). Так же агент может создавать в базе новые объекты, удалять их и изменять, опираясь на адрес.Let's assume that the entire database is available to some agent for reading and writing. An agent, having an address, can read the objects stored in the database (or make sure that there is no object at the specified address in the database). The agent can also create new objects in the database, delete them and modify them based on the address.

Операции записи в такую БД агент будет осуществлять посредством трех иерархически связанных объектов:Write operations to such a database will be performed by the agent through three hierarchically related objects:

1. "Операций"1. "Operations"

2. Состоящих из операций "транзакций"2. Consisting of operations "transactions"

3. Состоящего из транзакций "лога транзакций". ОПЕРАЦИЯ3. Consisting of transactions "transaction log". OPERATION

"Операция" описывает минимальное изменение объектов в БД и может быть применена к (выполнена на) БД. Операция включает тип, адрес целевого объекта(или объектов) и данные, необходимые для выполнения операции. Примером операций может быть:An "operation" describes a minimal change to objects in the database and can be applied to (performed on) the database. The operation includes the type, address of the target object(s), and the data needed to complete the operation. An example of an operation would be:

• Создание объекта. Данные при этом - содержимое объекта, который надо создать, например "создать целое число 8 по адресу [/5/8/12/8]".• Creation of an object. In this case, the data is the contents of the object to be created, for example, "create an integer 8 at the address [/5/8/12/8]".

• Удаление объекта. Данные при этом - пустое поле, например "удалить объект по адресу [/5/8/12/8]"• Deleting an object. The data in this case is an empty field, for example "delete an object at [/5/8/12/8]"

• Перенос объекта с адреса А на адрес Б. Данные при этом - адрес Б, на которые надо перенести данные с адреса А. Например, "перенести объект с адреса [/5/8/12/8] на адрес [/5/7/12/8]".• Transferring an object from address A to address B. In this case, the data is address B, to which you need to transfer data from address A. For example, "move an object from address [/5/8/12/8] to address [/5/7 /12/8]".

• Сравнение объекта на равенство. Данные при этом - значение, с которым надо сравнить объект. Например "проверить, что по адресу [/5/8/12/8] хранится целое число 8"• Comparing an object for equality. In this case, the data is the value with which the object must be compared. For example "check that the address [/5/8/12/8] contains the integer 8"

Типов такого рода операций может быть множество, от самых простых (создание/удаление, арифметические операции, операции "больше/меньше", операции смены типа с "целое" на "число с плавающей точкой" и т.п.) до более сложных, если объект представляет из себя сложную структуру (перестроить 3D модель звездной системы по адресу [/98585/9982157/6654781] с учетом текущих гравитационных полей).There can be many types of such operations, from the simplest (creation / deletion, arithmetic operations, more / less operations, operations of changing the type from "integer" to "floating point number", etc.) to more complex ones, if the object is a complex structure (rebuild the 3D model of the star system at [/98585/9982157/6654781] taking into account the current gravitational fields).

Операции могут быть различными, но они должны соответствовать следующим критериям:Operations can be different, but they must meet the following criteria:

1. Затрагивать конечное, жестко детерминированное число топологических областей БД. Операция может читать или вносить изменения в один конкретный объект или в группу объектов, но перечень затронутых областей должен определяться однозначно и не зависеть от состояния БД. В идеальном случае операция затрагивает либо один объект в БД (изменение объекта), либо два (перенос объекта), но могут быть и более сложные случаи.1. Affect a finite, rigidly determined number of database topological areas. An operation can read or make changes to one specific object or to a group of objects, but the list of affected areas must be uniquely determined and not depend on the state of the database. Ideally, the operation affects either one object in the database (changing an object) or two (moving an object), but there may be more complex cases.

Например, операция вида "перенести объект, на который ссылается объект БД по адресу…" не является, в общем случае, допустимой. Дело в том, что в этом случае, в зависимости от состояния БД на момент исполнения операции, затронутые области могут отличаться.For example, an operation like "move the object referred to by the database object at the address ..." is not, in general, valid. The fact is that in this case, depending on the state of the database at the time of the operation, the affected areas may differ.

2. Быть детерминистической, то есть, будучи выполненной на содержащей те же данные БД, операция должна всегда давать один и тот же результат. Если операция "записать случайное число" будет записывать заново сгенерированное (то есть, как правило, новое) случайное число при каждом исполнении на той же самой БД (на одном агенте или на разных), то это некорректная операция.2. Be deterministic, that is, when performed on a database containing the same data, the operation must always give the same result. If the "write random number" operation will write a newly generated (that is, usually new) random number each time it is executed on the same database (on the same agent or on different ones), then this is an incorrect operation.

3. Операция может быть выполнена успешно, а может - неуспешно ("провалиться").3. The operation may or may not succeed ("fail").

Пример неуспешных (провальных) операций:An example of unsuccessful (failed) operations:

а. Операция "арифметически прибавить к объекту "строка “try’" объект "целое число 5" невозможна - со строкой нельзя производить арифметические операции.a. The operation "arithmetically add to the object "string" try'" the object "integer 5" is impossible - it is impossible to perform arithmetic operations with the string.

b. Операция переноса несуществующего объекта. Если в БД нет объекта [/1/8/9/9/8] то операция "перенести объект [/1/8/9/9/8] на новый адрес [/1/8/9/9/5]" не будет выполнена, поскольку невозможна.b. The operation of moving a non-existent object. If there is no object [/1/8/9/9/8] in the database, then the operation "move the object [/1/8/9/9/8] to a new address [/1/8/9/9/5]" will not be executed because it is not possible.

c. Операция сравнения, если сравнение вернуло "ложь" ("false"). Например, если объект у нас "целое число 5" и мы применим к нему операцию "проверить равенство целому числу 8", такая операция будет неуспешна.c. The comparison operation if the comparison returned "false". For example, if we have an object "integer 5" and we apply the operation "check equality to integer 8" to it, such an operation will not be successful.

4. Операция должна быть "откатываемой" назад. Если мы заменили значение "целое число 5" на "целое число 8", мы можем запомнить прежнее значение, и потом сможем вернуть БД к состоянию "до исполнения операции". Так и с любой другой операцией должна быть возможность "откатить" назад, вернув БД к состоянию "до исполнения операции" (операции "сравнения", поскольку они в БД изменений не вносят, не нуждаются в особой процедуре отката).4. The operation must be "rollback" back. If we replaced the value "integer 5" with "integer 8", we can remember the previous value, and then we can return the database to the "before operation" state. So with any other operation, it should be possible to "roll back" back, returning the database to the state "before the operation was executed" (comparison operations, since they do not make changes to the database, do not need a special rollback procedure).

ТРАНЗАКЦИЯTRANSACTION

Для внесения изменений в БД отдельные операции возможно объединять в "транзакции". Транзакция может состоять из одной и более операций. Транзакции логически выполняют на БД последовательно, а не параллельно, то есть пока состояние БД меняет одна транзакция, другие транзакции БД не меняют (это требование "логическое", то есть фактическая реализация, отслеживающая области, затрагиваемые транзакциями, может де-факто исполнять параллельно непересекающиеся транзакции для повышения производительности). Операции в транзакции выполняют в заданной последовательности, что, благодаря свойствам операций, позволяет как выполнить транзакцию на БД (при этом все операции выполняются в прямом порядке, до первой неуспешной операции), так и "откатить" (при этом выполненные операции откатывают в обратном порядке и, таким образом, БД гарантированно возвращают в состояние до транзакции).To make changes to the database, individual operations can be combined into "transactions". A transaction can consist of one or more transactions. Transactions are logically executed on the database sequentially, not in parallel, that is, while the state of the database is changed by one transaction, other transactions of the database do not change (this requirement is "logical", that is, the actual implementation that tracks the areas affected by transactions can de facto execute non-overlapping transactions to improve performance). Operations in a transaction are performed in a given sequence, which, thanks to the properties of operations, allows both to execute a transaction on the database (in this case, all operations are performed in direct order, until the first unsuccessful operation), and to "roll back" (in this case, completed operations are rolled back in reverse order). and thus the database is guaranteed to return to the state before the transaction).

Опираясь на возможности выполнять откат отдельных операций, возможно сделать все транзакции атомарными. То есть операции транзакции либо все исполняют, либо все не исполняют. Провал (неуспех) любой из операций, входящих в транзакцию, приводит к провалу всей транзакции, при этом выполняют откат всех уже выполненных операций в обратном порядке, а БД по итогу неуспешного исполнения транзакции остается неизменной.Relying on the ability to roll back individual operations, it is possible to make all transactions atomic. That is, the operations of a transaction are either all executed or not all executed. Failure (failure) of any of the operations included in the transaction leads to the failure of the entire transaction, while all operations already performed are rolled back in reverse order, and the database remains unchanged as a result of the unsuccessful execution of the transaction.

Атомарность, помимо исключения неконсистентных и непредсказуемых изменений БД, полезна для реализации базовой логики "если… то" встроенной в транзакцию, что крайне полезно для работы в условиях неопределенности актуального состояния БД на каждом отдельном агенте. Например, при сочетании операций сравнения с операциями записи, транзакция может выглядеть так:Atomicity, in addition to eliminating inconsistent and unpredictable database changes, is useful for implementing the basic "if ... then" logic built into the transaction, which is extremely useful for working in conditions of uncertainty of the current state of the database on each individual agent. For example, when combining compare operations with write operations, the transaction might look like this:

1. Проверить, что по адресу [/1/2/2/8/7] хранится целое число 121. Check that the address [/1/2/2/8/7] contains the integer 12

2. Присвоить целому числу по адресу [/1/2/2/8/7] значение 62. Set the integer at address [/1/2/2/8/7] to 6

3. Присвоить целому числу по адресу [/1/2/2/8/9] значение 33. Set the integer at [/1/2/2/8/9] to 3

4. Проверить, что сумма [/1/2/2/8/7] и [/1/2/2/8/1] равна 84. Check that the sum of [/1/2/2/8/7] and [/1/2/2/8/1] is 8

Таким образом, можно быть уверенным, что если любая проверка не будет успешно пройдена (первая, размещенная в транзакции до операций присвоения, или итоговая, проверяющая уже измененные значения), то ни одна операция из этой транзакции не будет исполнена.Thus, you can be sure that if any check is not successfully passed (the first one, placed in the transaction before the assignment operations, or the final one, checking the already changed values), then none of the operations from this transaction will be executed.

Благодаря тому, что для каждой операции точно известны затронутые в ней топографические области, можно и для каждой транзакции (просто осмотром операций) установить перечень областей БД, которые затронет транзакция.Due to the fact that for each operation the topographic areas affected in it are precisely known, it is also possible for each transaction (just by examining operations) to establish a list of database areas that will be affected by the transaction.

ЛОГ ТРАНЗАКЦИЙTRANSACTION LOG

Изменения в БД предлагается вносить путем последовательного исполнения транзакций. В простейшем случае первоначально БД будет абсолютно пустой, и на этой БД сначала исполняют транзакции с операциями "создать объект", затем любые другие транзакции.Changes in the database are proposed to be made by sequential execution of transactions. In the simplest case, the database will initially be completely empty, and on this database, transactions with the "create object" operations are first executed, then any other transactions.

Общий, безусловно упорядоченный перечень таких последовательно исполняемых транзакций, определим как "лог транзакций".A general, unconditionally ordered list of such sequentially executed transactions, we will define as a "transaction log".

Транзакции (на каждом агенте и на уровне глобального лога БД) будут помещаться в "лог транзакций" в фиксированном порядке. Порядок можно, например, установить следующий:Transactions (on each agent and at the level of the global database log) will be placed in the "transaction log" in a fixed order. The order can, for example, be set as follows:

1. для каждой транзакции будет сгенерирован уникальный ID,1. a unique ID will be generated for each transaction,

2. ID будет включать текущее время и ID агента, создавшего транзакцию,2. The ID will include the current time and the ID of the agent that created the transaction,

3. также возможно добавить в ID транзакции счетчик транзакций данного агента, что позволит другим акторам обнаруживать "пропущенные" транзакции,3. it is also possible to add a transaction counter of this agent to the transaction ID, which will allow other actors to detect "skipped" transactions,

4. поскольку каждая следующая транзакция будет создана позже предыдущей, получится у каждой транзакции уникальный ID,4. since each next transaction will be created later than the previous one, each transaction will have a unique ID,

5. если отсортировать все транзакции, опираясь на такой ID (транзакции), сначала по возрастанию времени, а затем по возрастанию ID агента, и затем счетчика (если его используют, что снижает требования к точности счетчика времени), то получается простой и однозначный способ расположить все транзакции по порядку.5. if all transactions are sorted based on such an ID (transactions), first in ascending order of time, and then in ascending order of the agent ID, and then the counter (if it is used, which reduces the requirements for the accuracy of the time counter), then we get a simple and unambiguous way put all transactions in order.

ИСПОЛНЕНИЕ ЛОГА ТРАНЗАКЦИЙTRANSACTION LOG EXECUTION

Полученный лог (упорядоченный список) транзакций может быть исполнен (выполняют все транзакции в прямом порядке, от самых старых к самым новым) и "отменен" (откатываются все транзакции в обратном порядке, от самых новых к самым старым). Лог может быть выполнен (и отменен) полностью или частично.The resulting log (ordered list) of transactions can be executed (perform all transactions in direct order, from oldest to newest) and "undone" (roll back all transactions in reverse order, from newest to oldest). The log can be executed (and canceled) in whole or in part.

При добавлении новой транзакции в лог, она может попасть не только в конец списка, но и в произвольное место. Например, если агент А создал транзакцию пять минут назад, но, из-за проблем сетевой связности, смог передать ее для помещения в лог агенту Б только что (т.е. с задержкой), а другие агенты к этому времени уже внесли в лог свои транзакции. При этом, если транзакции, оказавшиеся в списке после ("за") новой транзакции уже были исполнены на БД, их следует "откатить" (вернуть назад), затем выполнить "новую" (а на самом деле старую) транзакцию, а затем заново выполнить все последующие транзакции, которые были только что отменены. Функционально это эквивалентно возврату БД в стартовое состояние и последовательному применению всех транзакций из итогового лога, но выполняется несравненно быстрей, особенно, если лог большой, включает много транзакций.When adding a new transaction to the log, it can get not only to the end of the list, but also to an arbitrary place. For example, if agent A created a transaction five minutes ago, but, due to network connectivity problems, was able to transfer it to be logged to agent B just now (i.e. with a delay), and other agents had already logged by this time your transactions. In this case, if the transactions that were in the list after ("before") the new transaction have already been executed on the database, they should be "rolled back" (back), then execute the "new" (and in fact the old) transaction, and then again execute all subsequent transactions that have just been undone. Functionally, this is equivalent to returning the database to the starting state and sequentially applying all transactions from the final log, but it is incomparably faster, especially if the log is large and includes many transactions.

Поскольку лог транзакций выстроен так, чтобы быть после завершения обмена данными идентичным у всех агентов а все операции детерминистичные, итоговое состояние БД на всех агентах так же будет идентично. Если некоторые операции, добавленные агентами, не будут совместимы с итоговым состоянием БД, они одновременно не будут успешными и не выполнятся у всех агентов, не породив никакой неконсистентности.Since the transaction log is built so that after the completion of the data exchange it will be identical for all agents and all operations are deterministic, the final state of the database on all agents will also be identical. If some operations added by agents are not compatible with the final state of the database, they will not be successful at the same time and will not be executed for all agents, without generating any inconsistency.

Отслеживая затронутые ветви рассматриваемой в примере древовидной адресации БД, можно даже откатывать и выполнять заново не все транзакции, а только те, на результаты которых вновь добавленная транзакция могла повлиять (если таковые есть), что даст еще большую производительность.By tracking the affected branches of the DB tree addressing considered in the example, you can even roll back and re-execute not all transactions, but only those whose results the newly added transaction could have affected (if any), which will give even greater performance.

Благодаря возможности помещать транзакции в лог в произвольной очередности, множество агентов могут асинхронно и несогласованно добавлять в лог новые транзакции. При этом всегда возможно:Due to the ability to put transactions in the log in an arbitrary order, multiple agents can asynchronously and inconsistently add new transactions to the log. In this case, it is always possible:

1. однозначно определить, последовательность выполнения транзакций в логе,1. uniquely determine the sequence of transactions in the log,

2. детерминистически применить к БД имеющийся у агента лог транзакций,2. deterministically apply the transaction log available to the agent to the database,

3. получить новые транзакции, вставить их в лог транзакций (в том числе "задним числом") и корректно применить итоговый лог транзакций приведя БД к состоянию, последовательного исполнения итогового лога целиком3. receive new transactions, insert them into the transaction log (including "backdating") and correctly apply the final transaction log, bringing the database to the state of sequential execution of the entire final log

4. опираясь на пункты 1-3 выше, возможно участие неограниченного количества агентов, работающих каждый со своей локальной копией БД, при этом получающих идентичные состояния БД, при условии, что они успешно обмениваются своими транзакциями и каждый агент в итоге получает полный перечень транзакций, причем обмен транзакциями между агентами может проходить в любой очередности.4. based on points 1-3 above, an unlimited number of agents can participate, each working with their own local copy of the database, while receiving identical database states, provided that they successfully exchange their transactions and each agent eventually receives a complete list of transactions, moreover, the exchange of transactions between agents can take place in any order.

5. опираясь на атомарность транзакций, возможно рассчитывать, что даже в процессе продолжающегося сбора и исполнения лога транзакций каждый агент будет иметь, возможно, уникальное состояние БД, но это состояние будет консистентно и в целом будет пригодно для чтения/записи в каждый момент времени, вне зависимости от скорости и регулярности обмена транзакциями с другими агентами.5. Based on the atomicity of transactions, it is possible to expect that even in the process of the ongoing collection and execution of the transaction log, each agent will possibly have a unique database state, but this state will be consistent and, in general, will be suitable for reading / writing at any given time, regardless of the speed and regularity of the exchange of transactions with other agents.

6. побочным негативным следствием такого способа является невозможность гарантировать успешное выполнение транзакции в момент помещения ее в лог агентом. Точно определить, была ли транзакция исполнена или провалилась, можно только в момент наступления "ясности", об этом см. далее.6. A side negative consequence of this method is the inability to guarantee the successful completion of the transaction at the time it is placed in the log by the agent. It is possible to determine exactly whether a transaction was executed or failed only at the moment of "clarity", see below.

Следует отметить, что использование для распределенной работы с данными технологии "БД + Лог Транзакций" (DLT, Distrit ledger) является общеизвестной и широко используемой в многих системах хранения, например, в Р2Р-криптовалютах, таких как Bitcoin. Новизна заявляемого решения (подробно описанная ниже) состоит в том, что общий лог транзакций разбивают на сегменты благодаря и в связи с "топологической (топографической) сегментацией БД" и агенты, в каждый момент времени работая только с выбранными сегментами, могут быстро интегрировать изменения и в результате взаимодействовать с единой БД произвольного объема располагая крайне ограниченными ресурсами.It should be noted that the use of the "DB + Log Transactions" (DLT, Distrit ledger) technology for distributed work with data is well known and widely used in many storage systems, for example, in P2P cryptocurrencies such as Bitcoin. The novelty of the proposed solution (described in detail below) lies in the fact that the general transaction log is divided into segments due to and in connection with the "topological (topographic) segmentation of the database" and agents, working only with selected segments at any time, can quickly integrate changes and as a result, interact with a single database of arbitrary size with extremely limited resources.

РАСПРЕДЕЛЕННОЕ ХРАНЕНИЕ БДDISTRIBUTED DB STORAGE

ЛОКАЛЬНАЯ КОПИЯ ФРАГМЕНТА БДLOCAL COPY OF THE DB FRAGMENT

Предлагается на компьютерном устройстве агента хранить БД (целиком или частично) в виде набора независимых объектов, например, в виде файлов на диске, и/или объектов в памяти ЭВМ. На каждую топологическую область должно приходиться по одному изолированному объекту хранения. Каждый такой объект хранения может, в свою очередь, сам состоять из нескольких объектов, в зависимости от реализации, но в данном случае важно, что локальный объект, относящийся к одной области, может быть изменен, удален или скопирован агенту извне, полностью независимо от объектов, относящихся к другим областям. Объект, хранящий данные по отдельной области, на соседние объекты не влияет, а соседние объекты не влияют на него.It is proposed to store the database (in whole or in part) on the agent's computer device as a set of independent objects, for example, in the form of files on a disk and / or objects in the computer's memory. There must be one isolated storage object per topological area. Each such storage object may, in turn, itself consist of several objects, depending on the implementation, but in this case it is important that a local object belonging to one area can be changed, deleted or copied to the agent from the outside, completely independent of the objects related to other areas. An object that stores data in a separate area does not affect neighboring objects, and neighboring objects do not affect it.

Дополнительно можно делить объекты по "слоям" (например, типам), чтобы агент мог загрузить себе один слой для области, но не загружать данные по другим слоям.Additionally, you can divide objects by "layers" (for example, types), so that the agent can download one layer for itself for the area, but not download data for other layers.

В простейшем виде (удобном для пояснения) база может храниться на жестком диске агента в виде прямого указания пути к файлу и адреса объекта. При этом объект по адресу [/1/2/1/1] будет (например) храниться в файле "/storage/1/2/1/1.dat", а объект по адресу [/1/3/2/3/15] в файле "/storage/1/3/2/3/15.dat". Чтение/запись из такой базы реализуется тривиально и данные, относящиеся к одному слою одной топологической области, представлены папкой на диске. Такую папку можно легко удалить, изменить ее содержимое или скопировать у другого агента и это никак не затронет папки, в которых хранятся данные соседних областей.In its simplest form (convenient for explanation), the database can be stored on the agent's hard disk as a direct indication of the path to the file and the address of the object. In this case, the object at the address [/1/2/1/1] will (for example) be stored in the file "/storage/1/2/1/1.dat", and the object at the address [/1/3/2/3 /15] in the file "/storage/1/3/2/3/15.dat". Reading/writing from such a database is trivial, and data belonging to one layer of one topological area is represented by a folder on disk. Such a folder can be easily deleted, its contents changed, or copied from another agent, and this will not affect the folders that store the data of neighboring areas.

Более реалистичная реализация может использовать berkleydb (или аналогичную технологию хранения ключ-значение, например, https://ru.wikipedia.org/wiki/%D0%91%D0%B0%D0%B7%D0%B0%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85%C2%AB%D0%BA%D0%BB%D1%8E%D1%87-%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5%C2%BB) в качестве хранилища данных области. Если объем данных велик, а интенсивность записи высока, можно использовать несколько berkleydb-хранилищ, по одному для каждого "слоя". Если объем данных невелик и частичные обновления редки, можно использовать стандартные средства сериализации/ десериализации, например https://habr.com/ru/post/4 7 9462/. Для сессионных приложений, не требующих долговременного хранения данных, такие как "сессионные игры", где данные по окончании партии не нужны, можно ограничиться хранением данных по каждой области в памяти приложения, в виде динамически создаваемых ООП-объектов или иных, ориентированных на хранение данных в используемом языке программирования, структур (например struct в С++ https://en.wikipedia.org/wiki/Struct (С programming language))A more realistic implementation could use berkleydb (or a similar key-value storage technology, e.g. https://ru.wikipedia.org/wiki/%D0%91%D0%B0%D0%B7%D0%B0%D0%B4% D0%B0%D0%BD%D0%BD%D1%8B%D1%85%C2%AB%D0%BA%D0%BB%D1%8E%D1%87-%D0%B7%D0%BD%D0 %B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5%C2%BB) as the realm data store. If the amount of data is large and the write rate is high, multiple berkleydb storages can be used, one for each "layer". If the amount of data is small and partial updates are rare, you can use standard serialization / deserialization tools, for example https://habr.com/en/post/4 7 9462/. For session applications that do not require long-term data storage, such as "session games" where data is not needed at the end of the game, you can limit yourself to storing data for each area in the application's memory, in the form of dynamically created OOP objects or other storage-oriented data in the programming language used, structures (for example, struct in C ++ https://en.wikipedia.org/wiki/Struct (C programming language))

ЗОНА ВИДИМОСТИZONE OF VISIBILITY

Каждый агент может иметь (заданную самим агентом или установленную ему извне) произвольную зону видимости. Например, компьютер автомобиля, разыскивающий место для парковки, нуждается в информации о свободных парковках в радиусе 500 м, а информация о парковочных местах на другом конце города ему не нужна. Зона видимости может со временем меняться - перемещаться, изменять охват и т.д.Each agent can have an arbitrary visibility zone (specified by the agent himself or set to him from the outside). For example, a car computer looking for a parking space needs information about free parking lots within a radius of 500 m, but it does not need information about parking spaces on the other side of the city. The visibility zone can change over time - move, change coverage, etc.

В большинстве случаев информацию о зоне видимости агента стоит хранить в БД.In most cases, information about the agent's visibility zone should be stored in the database.

Поскольку данные вне зоны видимости агенту не нужно ни читать, ни записывать, каждый агент может хранить и обновлять у себя только информацию о топологических областях, входящих в его "зону видимости".Since the agent does not need to read or write data outside the visibility zone, each agent can store and update only information about the topological areas included in its "visibility zone".

По мере изменения "зоны видимости", агент будет удалять (или архивировать) у себя объекты, не относящиеся к его новой "зоне видимости" и получать извне (от соседних агентов или от сервера) данные по областям, которые в зоне видимости появились.As the "visibility zone" changes, the agent will delete (or archive) objects that are not related to its new "visibility zone" and receive from the outside (from neighboring agents or from the server) data on areas that have appeared in the visibility zone.

В результате, каждый агент в каждый момент времени будет хранить и обновлять у себя фрагмент базы, представляющий собой несколько областей из общей "мозаики".As a result, each agent at each moment of time will store and update a fragment of the database, which is several areas from the common "mosaic".

СЕГМЕНТИРОВАННЫЙ ЛОГ ТРАНЗАКЦИЙSEGMENTED TRANSACTION LOG

Аналогично тому, как опираясь на топологические области, разбивают всю БД на независимо хранящиеся и обновляемые фрагменты, возможно поступить с логом транзакций.In the same way that, based on topological areas, the entire database is divided into independently stored and updated fragments, it is possible to deal with the transaction log.

Как уже зафиксировано при описании объектов "транзакция", для каждой транзакции всегда точно известен перечень затронутых этой транзакцией топологических областей. Таким образом, возможно хранить (идеологически "единый" для всей БД) лог транзакций в виде набора "локальных" логов транзакций, относящихся к конкретным топологическим областям. При этом, если транзакция затрагивает (изменяет) несколько областей, возможно хранить несколько копий этой транзакции, по одной на каждую затронутую область. Дублирующиеся транзакции возможно обнаружить, поскольку каждой транзакции присвоен уникальный ID, что позволяет избавиться от повторов при объединении логов транзакций нескольких областей в единый лог транзакций.As already noted in the description of "transaction" objects, for each transaction the list of topological areas affected by this transaction is always known exactly. Thus, it is possible to store (ideologically "single" for the entire database) transaction log as a set of "local" transaction logs related to specific topological areas. In this case, if a transaction affects (changes) several areas, it is possible to store several copies of this transaction, one for each affected area. Duplicate transactions can be detected because each transaction is assigned a unique ID, which allows you to get rid of repetitions when combining the transaction logs of several areas into a single transaction log.

В этом случае каждый агент хранит лог транзакций в виде набора независимых логов, относящихся к отдельным областям. Например, для слоя 1 и области 2:1 лог можно хранить в файле "/storage/1/2/1/1.log".In this case, each agent stores the transaction log as a set of independent logs related to separate areas. For example, for layer 1 and area 2:1, the log can be stored in the file "/storage/1/2/1/1.log".

Поскольку каждый фрагмент лога содержит все транзакции, относящиеся к данной области, он является независимым и самодостаточным. Для каждой области можно хранить либо такой лог от создания БД, либо, лучше, хранить "снимок" промежуточного состояния БД (снимок можно снять только в состоянии "ясности" (полной определенности), см. ниже) области, плюс информацию о том, какая транзакция была выполнена в этом снимке последней, плюс лог транзакций для этой области, содержащий только транзакции, не вошедшие в снимок, размещенные в нем после последней транзакции снимка (снапшота). Из такого набора (снимок с точным временем создания, плюс лог более новых транзакций) возможно получить состояние области точно так же, как если бы имелся доступ ко всем транзакциям глобального лога и всей БД целиком.Since each log fragment contains all transactions related to this area, it is independent and self-sufficient. For each area, you can store either such a log from the creation of the database, or, better, store a "snapshot" of the intermediate state of the database (a snapshot can only be taken in the state of "clarity" (fully defined), see below) of the area, plus information about which the transaction was last executed in this snapshot, plus the transaction log for this area, containing only transactions not included in the snapshot, placed in it after the last snapshot transaction (snapshot). From such a set (a snapshot with the exact creation time, plus a log of newer transactions), it is possible to get the state of the area in the same way as if you had access to all transactions in the global log and the entire database.

Единственным исключением в этом случае может оказаться наличие операций типа копирования/переноса объектов из областей, не входящих в зону видимости агента, в область, находящуюся в зоне видимости. Эту проблему можно решить выборочным хранением в логе развернутой версии таких транзакций. Например, в целевой области [/2/3/4] вместо "копировать число с адреса [/1/1/1/4] на адрес [/2/3/4/5]" будет операция "создать число 5 адресу [/2/3/4/5]", а вместо "перенести" "перенести либо, если источник недоступен, создать"). Также возможно создать протокол обмена данными между агентами, чтобы агент мог запросить необходимый ему фрагмент данных у соседей и осуществить копирование недоступных объектов с полученного фрагмента. Оба решения, предполагают, что область-донор находится в состоянии "ясности" (полной определенности) (подробнее см. ниже), то есть транзакций "задним числом" уже не будет и агент точно знает финальное состояние копируемого объекта на момент копирования.The only exception in this case may be the presence of operations such as copying/transferring objects from areas that are not included in the agent's visibility zone to an area that is in the visibility zone. This problem can be solved by selectively storing the deployed version of such transactions in the log. For example, in the target area [/2/3/4] instead of "copy number from address [/1/1/1/4] to address [/2/3/4/5]" there will be the operation "create number 5 at address [ /2/3/4/5]", and instead of "transfer" "transfer or, if the source is not available, create"). It is also possible to create a data exchange protocol between agents so that the agent can request the data fragment it needs from its neighbors and copy inaccessible objects from the received fragment. Both solutions assume that the donor area is in a state of "clarity" (complete certainty) (see below for more details), that is, there will be no "backdated" transactions and the agent knows exactly the final state of the copied object at the time of copying.

ЕДИНАЯ БД КАК СУММА ЛОКАЛЬНЫХ КОПИЙA SINGLE DB AS A SUM OF LOCAL COPIES

Если имеется множество независимых агентов, использующих одну базу данных и обменивающихся данными между собой (например, через сеть интернет, подробности см. ниже), такая "мозаичная" база может не быть доступна целиком ни одному агенту и может не храниться целиком нигде. При этом каждый агент будет работать со своим фрагментом и сможет, при необходимости, получать необходимые фрагменты от других агентов.If there are many independent agents using the same database and exchanging data with each other (for example, via the Internet, see details below), such a "mosaic" database may not be fully accessible to any agent and may not be stored entirely anywhere. In this case, each agent will work with its own fragment and will be able, if necessary, to receive the necessary fragments from other agents.

Для отдельных применений (или для отдельных слоев более сложной БД) такая "мозаичная БД" из разбросанных по агентам фрагментов является уже полностью функциональной. Такой БД не требуется сервер или выделенный агент, хранящий всю БД целиком. Она как целое физически не существует ни на одной отдельной ЭВМ, каждый агент-пользователь видит и хранит только свой фрагмент. Если у фрагмента не остается ни у одного "хранителя" - значит это просто пустой фрагмент.For individual applications (or for individual layers of a more complex database), such a "mosaic database" of fragments scattered over agents is already fully functional. Such a database does not require a server or a dedicated agent that stores the entire database. It as a whole does not physically exist on any separate computer, each user agent sees and stores only its own fragment. If the fragment does not have any "keeper" - then it's just an empty fragment.

Например, если БД содержит только информацию о позиции и действиях аватаров игроков в игровой вселенной, информация о топологических областях, где отсутствуют аватары игроков, не существует и недоступна. Но, поскольку аватаров игроков там нет, это отсутствие данных а) формально корректно (пустое множество) и б) ни для одного агента это не представляет интереса или проблемы, поскольку если пустое место не в зоне видимости ни у одного игрока, то данные из этой области никому и не нужны. Верно и обратное, в каждой области, где представлен аватар игрока, ЭВМ этого игрока хранит и обслуживает соответствующий фрагмент БД. И если в поле его зрения попадет другой аватар, они успешно обменяются информацией друг о друге, поскольку агент другого игрока так же обслуживает область видимости своего аватара и располагает актуальной БД соответствующих областей. Таким образом, такая БД будет предоставлять всю необходимую и достаточную информацию каждому агенту.For example, if the database contains only information about the position and actions of player avatars in the game universe, information about topological areas where there are no player avatars does not exist and is not available. But, since there are no player avatars there, this lack of data is a) formally correct (an empty set) and b) this is of no interest or problem for any agent, because if an empty place is not in the visibility zone of any player, then the data from this areas are not needed. The opposite is also true, in each area where the player's avatar is represented, the computer of this player stores and maintains the corresponding fragment of the database. And if another avatar falls into his field of vision, they will successfully exchange information about each other, since the agent of the other player also maintains the visibility area of his avatar and has an up-to-date database of the corresponding areas. Thus, such a database will provide all the necessary and sufficient information to each agent.

Аналогичная реализация может работать для базы, данные в которой стремительно устаревают - данные с датчиков, обновляемые ежесекундно и т.п. Как только датчик перестанет обслуживать свою область (выйдет из строя, потеряет связь) соответствующая ему топологическая область станет "недоступна", но это вполне точно отражает положение вещей, так что можно считать, что БД со своей работой справилась.A similar implementation can work for a database in which the data is rapidly becoming outdated - data from sensors that are updated every second, etc. As soon as the sensor stops serving its area (fails down, loses connection), the topological area corresponding to it will become "inaccessible", but this quite accurately reflects the state of affairs, so we can assume that the database has done its job.

Для более сложных применений, где данные должны существовать в отсутствие "наблюдателя", потребуется применение (выделенных) агентов, целенаправленно архивирующих данные какого-то набора областей и предоставляющих "архивные" данные агентам, у которых соответствующая область попала в зону видимости. Такие агенты могут покрывать (или не покрывать) всю "территорию". Можно рассматривать таких выделенных агентов как "серверы", хотя это не совсем соответствует стандартной клиент-серверной идеологии и, во многих реализациях, функцию "хранителя" могут выполнять рядовые во всех остальных отношениях агенты (например, постоянно включенные датчики, обладающие достаточными вычислительными ресурсами).For more complex applications, where data must exist in the absence of an "observer", it will be necessary to use (dedicated) agents that purposefully archive data from a set of areas and provide "archived" data to agents whose corresponding area is in view. Such agents may or may not cover the entire "territory". You can consider such dedicated agents as "servers", although this does not quite correspond to the standard client-server ideology and, in many implementations, the "keeper" function can be performed by agents that are ordinary in all other respects (for example, always-on sensors with sufficient computing resources) .

СВЯЗЬ МЕЖДУ АГЕНТАМИCOMMUNICATION BETWEEN AGENTS

Для того, чтобы описываемая БД успешно функционировала, каждый агент должен иметь возможность:In order for the described database to function successfully, each agent must be able to:

1. Идентифицировать (желательно всех) агентов, чья зона видимости пересекается с зоной видимости данного агента (далее "соседей")1. Identify (preferably all) agents whose visibility zone intersects with the visibility zone of this agent (hereinafter referred to as "neighbors")

2. Устанавливать связь и/или обмениваться данными с некоторыми (или всеми) соседями2. Communicate and/or exchange data with some (or all) neighbors

3. Связь между соседями должна обеспечивать связь каждого с каждым, опосредованно (сосед моего соседа связан со мной) или напрямую. Иными словами, все соседи, имеющие перекрытия зон видимости, должны формировать (сформировать, образовать) связный граф.3. The connection between neighbors should ensure the connection of each with each, indirectly (my neighbor's neighbor is connected with me) or directly. In other words, all neighbors with overlapping visibility zones must form (form, form) a connected graph.

Например, в случае автомобилей, связь и идентификация соседей может осуществляться напрямую, посредством WiFi соединений между агентами, либо посредством стандартной сотовой сети. При использовании стандартной сотовой сети для передачи данных идентифицировать соседей агенты самостоятельно не смогут, сведения о соседях должны будут предоставить либо сотовая сеть, либо какой-то другой провайдер.For example, in the case of cars, communication and identification of neighbors can be carried out directly, via WiFi connections between agents, or via a standard cellular network. When using a standard cellular network for data transmission, agents will not be able to identify neighbors on their own, information about neighbors will have to be provided either by a cellular network or some other provider.

В случае военного подразделения, перечень подключенных к сети узлов может быть задан заранее и/или извне, так как произвольным узлам доступ в такую сеть не нужен. Связность между узлами здесь будет, вероятно, достаточно разнородна и может обеспечиваться с учетом особенностей имеющегося в наличии оборудования и обстановки - какие-то каналы будут проводные, какие-то радио-, где-то можно использовать оптическую передачу. Но логика работы описываемой БД не чувствительна к природе и разнородности каналов постольку, поскольку агенты смогут систематически обмениваться сообщениями, содержащими транзакции и т.п. (см. ниже). Связь "каждый с каждым" не требуется, достаточно чтобы граф агентов был связным.In the case of a military unit, the list of nodes connected to the network can be predefined and/or external, since arbitrary nodes do not need access to such a network. Connectivity between the nodes here will probably be quite heterogeneous and can be provided taking into account the characteristics of the available equipment and environment - some channels will be wired, some radio, somewhere you can use optical transmission. But the logic of operation of the described database is not sensitive to the nature and heterogeneity of channels insofar as agents can systematically exchange messages containing transactions, etc. (see below). Communication "each with each" is not required, it is enough that the graph of agents is connected.

В сетевой игре соединения так же будут часто разнородны: выделенный сервер может потребоваться на этапе подключения агента к сообществу, в дальнейшем, в зависимости от требовательности игры к безопасности и отзывчивости, клиенты могут либо вовсе не прибегать к услугам сервера, либо прибегать в крайних ситуациях (например, для создания Р2Р каналов между агентами, подключенными через NAT (Network Address Translation), либо (оптимально) передавать максимально возможный объем данных через Р2Р каналы, а то, что невозможно обработать через прямые соединения (из-за требований безопасности и/или из-за невозможности создать Р2Р соединение) обрабатывать с привлечением сервера.In a multiplayer game, the connections will also often be heterogeneous: a dedicated server may be required at the stage of connecting the agent to the community, later, depending on the game’s demands for security and responsiveness, clients may either not use the server’s services at all, or resort in extreme situations ( for example, to create P2P channels between agents connected via NAT (Network Address Translation), or (optimally) to transfer the maximum possible amount of data through P2P channels, and what cannot be processed through direct connections (due to security requirements and / or from - due to the inability to create a P2P connection) to process with the involvement of the server.

ОБМЕН ИНФОРМАЦИЕЙ МЕЖДУ АГЕНТАМИEXCHANGE OF INFORMATION BETWEEN AGENTS

Обмен данными между агентами будет, по крайней мере, состоять из следующих шагов:Communication between agents will at least consist of the following steps:

• агент будет рассылать всем соседям (напрямую или транзитом через непосредственно подключенных соседей) информацию о помещаемых агентом в лог БД транзакциях. Информация, помимо перечня операций и служебной информации, относящейся к транзакции, может включать электронную подпись транзакции секретным ключом, что обеспечит проверку авторства транзакций,• the agent will send to all neighbors (directly or in transit through directly connected neighbors) information about transactions placed by the agent in the database log. Information, in addition to the list of transactions and service information related to the transaction, may include an electronic signature of the transaction with a secret key, which will verify the authorship of transactions,

• агент может рассылать всем соседям "пульс" (синхронизирующие сообщения), содержащий текущее время и ID последней выписанной агентом транзакции (см. ниже раздел "ясность"),• the agent can send to all neighbors a "pulse" (synchronizing messages) containing the current time and the ID of the last transaction issued by the agent (see the "clarity" section below),

• агент может заверять полученные от соседей транзакции (например, заверять секретным ключом время и/или выполнимость транзакции) и рассылать отдельное заверение и/или уже заверенную "А выписал, Б одобрил" транзакцию,• the agent can certify transactions received from neighbors (for example, certify the time and/or feasibility of the transaction with a secret key) and send a separate certification and/or an already certified "A issued, B approved" transaction,

• агент может пересылать полученные транзакции (и заверения транзакций) дальше, другим соседям (функционально выступая "транзитным шлюзом"). При этом агент может просто пересылать транзакции дальше всем соседям, которые не прислали транзакцию с этим ID, или использовать оптимизационные алгоритмы опираясь на знания состояния "сети" соседей,• the agent can forward received transactions (and confirmations of transactions) further, to other neighbors (functionally acting as a "transit gateway"). In this case, the agent can simply forward transactions further to all neighbors that did not send a transaction with this ID, or use optimization algorithms based on knowledge of the state of the "network" of neighbors,

• агент может по запросу передавать соседу "снимок" известной ему области БД (см. ниже) и/или фрагмент лога транзакций, относящихся к известной ему области БД; снимок может быть подписан электронной подписью, чтобы удостоверить целостность и авторство "снимка БД" и "снимка лога транзакций",• the agent can, upon request, send to its neighbor a "snapshot" of the DB area known to it (see below) and/or a fragment of the transaction log related to the DB area known to it; the snapshot can be signed with an electronic signature to certify the integrity and authorship of the "database snapshot" and "transaction log snapshot",

• Агент может, по запросу соседа, передавать ему транзакцию с определенным ID (например, полезно, если транзакция не была доставлена из-за сетевых проблем, а сосед из пульса знает, что она существует).• An agent can, upon neighbor's request, send a transaction with a specific ID to it (for example, it is useful if the transaction was not delivered due to network problems, and the neighbor knows from the heartbeat that it exists).

СОСТОЯНИЕ ОБЛАСТИ - ОБМЕН МЕЖДУ АГЕНТАМИAREA STATUS - EXCHANGE BETWEEN AGENTS

В том случае, когда зона интереса агента (что делает агент в ситуации, когда его зона интереса) включает топологическую область, информацией о которой агент не располагает, он выполняет следующие действия:In the case when the agent's area of interest (which the agent does in a situation where his area of interest) includes a topological area about which the agent does not have information, he performs the following actions:

1. агент находит соседа, уже имеющего нужную область у себя в зоне интереса (и авторизованного (обладающего правами) отдавать по запросу "снимок" информации области),1. the agent finds a neighbor who already has the desired area in his area of interest (and is authorized (possessing the rights) to give a "snapshot" of area information on request),

2. агент посылает этому соседу запрос "требуется снимок области",2. the agent sends a "area snapshot required" request to this neighbor,

3. сосед, если он не располагает информацией по интересующей области, может переслать такой запрос далее или вернуть отказ; если информация у него есть, сосед удовлетворяет запрос; для этого:3. a neighbor, if he does not have information on the area of interest, can forward such a request further or return a refusal; if he has the information, the neighbor satisfies the request; for this:

a. сосед выясняет последнюю известную транзакцию, перед которой уже новых транзакций точно не будет (т.е. "момент ясности") (см. ниже раздел «ЯСНОСТЬ»)a. the neighbor finds out the last known transaction, before which there will definitely not be new transactions (i.e., the “clear moment”) (see the “CLARITY” section below)

b. откатывает (в простейшем случае) вообще все исполненные после "момента ясности" транзакции, либо (чуть сложней) транзакции, относящиеся к нужной области и размещенные в логе после "момента ясности" плюс транзакции, от которых зависят эти транзакции,b. rolls back (in the simplest case) generally all transactions executed after the “clear moment”, or (slightly more complicated) transactions related to the desired area and placed in the log after the “clarity moment”, plus the transactions on which these transactions depend,

c. снимает слепок с области (в простом примере с файлами, это может быть zip-архив с содержимым папки области),c. takes a snapshot of the area (in a simple example with files, this can be a zip archive with the contents of the area folder),

d. передает запросившему полученный слепок,d. transfers the received impression to the requester,

e. передает запросившему ID последней исполненной на слепке транзакции,e. passes to the requester the ID of the last transaction executed on the snapshot,

f. передает запросившему перечень агентов-соседей с состоянием их счетчиков (в случае расчета "ясности" на основе счетчиков транзакций),f. sends to the requester a list of neighboring agents with the state of their counters (in the case of calculating "clarity" based on transaction counters),

g. передает запросившему все известные транзакции, относящиеся к запрошенной области и имеющиеся у отдающего в логе после "момента ясности",g. transfers to the requester all known transactions related to the requested area and available to the giver in the log after the "moment of clarity",

h. все вместе или по отдельности может быть перед передачей подписано секретным ключом,h. all together or separately can be signed with a secret key before transmission,

4. получив и разместив этот набор данных, агент получает полноценный рабочий раздел БД, отвечающий за область, и может дальше штатно работать (в т.ч. предоставлять "слепок" другим соседям, если он авторизован на такие операции),4. Having received and placed this data set, the agent receives a full-fledged working section of the database responsible for the area, and can continue to work normally (including providing a "cast" to other neighbors if he is authorized for such operations),

5. если первый сосед не вернул запрошенный снимок агент запрашивает снимок у другого соседа, затем у следующего, и так далее,5. if the first neighbor did not return the requested snapshot, the agent requests a snapshot from another neighbor, then from the next one, and so on,

а. Если ни один сосед, авторизованный отдавать "снимки" (включая соседей, выступающих роли выделенных агентов-архивариусов, агентов-серверов и пр., если такие имеются) не вернул требуемый снимок, агент может действовать так же, как если бы его соединение с сообществом было физически разорвано.a. If no neighbor authorized to give "snapshots" (including neighbors acting as dedicated archiving agents, server agents, etc., if any) has returned the requested snapshot, the agent may act as if its connection to the community was physically torn apart.

Последующие транзакции агент штатно получает из рассылок (либо явно запрашивает, если из пульса становится ясно, что какие-то транзакции, добавленные другими агентами в лог после момента "снимка", у него отсутствуют).The agent regularly receives subsequent transactions from mailings (or explicitly requests if it becomes clear from the pulse that some transactions added by other agents to the log after the "snapshot" moment are missing).

РОЛИ АГЕНТОВROLES OF AGENTS

В зависимости от требований конкретного приложения, агенты (устройства-участники), составляющие сообщество, могут быть полностью идентичны и равноправны, либо могут иметь явно выраженное разделение функций. Роли агентов могут меняться от структуры "все равны" до многоуровневой переплетенной схемы, где разные агенты имеют разные права на разные слои БД, разные типы транзакций, etc.Depending on the requirements of a particular application, the agents (participant devices) that make up the community can be completely identical and equal, or they can have an explicit separation of functions. The roles of agents can vary from an "all equal" structure to a multi-level interlaced scheme, where different agents have different rights to different database layers, different types of transactions, etc.

Разделение, например, может выглядеть так:The division, for example, might look like this:

• агент может выступать в роли "недоверенного актора" (недоверенного участника сообщества): имеет право создавать транзакции, которые другие агенты должны проверить и заверить либо отвергнуть,• an agent can act as a "non-trusted actor" (untrusted member of the community): has the right to create transactions that other agents must verify and approve or reject,

• агент может выступать в роли "арбитра", не имеющего права создавать транзакции, но имеющего право заверять транзакции; такого "арбитра" может, например, принудительно назначать каждому агенту-актору сервер,• an agent can act as an "arbitrator" who does not have the right to create transactions, but has the right to certify transactions; such an "arbiter" can, for example, be forced to assign to each agent-actor a server,

• часть агентов, контролируемых администрацией, может выступать в роли "сервера" с исключительными правами подписывать и заверять собственные транзакции, с правом записи в слой БД "реестр пользователей".• Some of the agents controlled by the administration can act as a "server" with exclusive rights to sign and certify their own transactions, with the right to write to the database layer "user registry".

• роли агентам может выдавать выделенный агент-сервер,• agent roles can be assigned by a dedicated agent-server,

например, занося данные о статусе каждого агента в БД в раздел, доступный на запись только серверу, и все остальные агенту будут ориентироваться на эту информацию.for example, entering data on the status of each agent in the database in a section that is writable only by the server, and all other agents will be guided by this information.

Агенты - арбитрыAgents - arbitrators

Стоит также иметь в виду, что на одной ЭВМ (с одной и той же БД) может одновременно работать несколько агентов в разных ролях (или даже в разных ролях на разных БД). Например, подключившись к серверу авторизации компьютерной сетевой игры программа, помимо подключения к БД для управления аватаром игрока в роли "недоверенного актора", может получить роль "арбитра" в той же (или другой) БД. При этом агент будет проверять и заверять действия другого игрока, случайно подобранного сервером, чтобы исключить мошеннические, запрещенные игрой, действия.It should also be borne in mind that several agents in different roles (or even in different roles on different databases) can work on the same computer (with the same database) at the same time. For example, by connecting to the authorization server of a computer network game, the program, in addition to connecting to the database to control the player's avatar as an "untrusted actor", can get the role of "arbiter" in the same (or another) database. In this case, the agent will check and certify the actions of another player randomly selected by the server in order to exclude fraudulent actions prohibited by the game.

Такая валидация "на стороне случайного игрока" не является абсолютно надежной защитой от несанкционированных изменений БД, валидация на стороне сервера позволяет добиться большей надежности. Но полноценная валидация на стороне сервера крайне ресурсоемка и потому редко используется. К тому же ресурсоемкость серверной валидации линейно возрастает с числом игроков, что часто делает ее совершенно неприменимой. Валидация же одним игроком другого игрока масштабируется бесконечно, параллельно с ростом числа игроков. Назначив каждому игроку двух случайных "арбитров" из числа игроков, получают вероятность "сговора" арбитров и игрока 0,01% в игровой вселенной, где присутствует всего 100 игроков. С ростом числа игроков привлекательность взлома линейно растет, но при этом нелинейно (обратно пропорционально квадрату числа игроков) падает и вероятность "сговора" игрока и арбитров, что дает прекрасный баланс безопасности и простоты реализации.Such validation "on the side of a random player" is not absolutely reliable protection against unauthorized changes to the database, validation on the server side allows you to achieve greater reliability. But full validation on the server side is extremely resource intensive and therefore rarely used. In addition, the resource intensity of server-side validation increases linearly with the number of players, which often makes it completely inapplicable. Validation by one player of another player scales infinitely, in parallel with the growth in the number of players. By assigning each player two random "arbitrators" from among the players, the probability of "collusion" between the arbitrators and the player is 0.01% in a game universe where there are only 100 players. As the number of players increases, the attractiveness of hacking grows linearly, but at the same time, the probability of "collusion" between the player and arbitrators also decreases non-linearly (inversely proportional to the square of the number of players), which gives an excellent balance of security and ease of implementation.

ЯСНОСТЬCLARITY

В БД, функционирующей в описываемом режиме из-за непредсказуемых задержек доставки, обрывов связности и перестроек структуры сети, агент может столкнуться с вопросом: куда в имеющийся лог транзакций все еще могут добавиться новые транзакции, а где лог уже зафиксирован и новых транзакций гарантированно не будет?In a database operating in the described mode due to unpredictable delivery delays, connectivity interruptions, and network restructuring, the agent may face the question: where new transactions can still be added to the existing transaction log, and where the log is already fixed and there will be no new transactions guaranteed ?

Это важно, например, при передаче "снимка" области БД, так как снимок должен состоять из собственно снимка данных в БД и лога транзакций, которые были добавлены после снятия снимка. Если сделать снимок по состоянию на некоторый момент времени Т и передать такой снимок (слепок) соседу, и потом окажется, что появилась новая транзакция, датированная временем Т-1, то сосед, не имея полноценного лога для периода, предшествовавшего Т, не сможет применить такую транзакцию к своей БД.This is important, for example, when transferring a "snapshot" of a database area, since the snapshot should consist of the actual data snapshot in the database and the transaction log that were added after the snapshot was taken. If we take a snapshot as of some point in time T and transfer such a snapshot (imprint) to a neighbor, and then it turns out that a new transaction has appeared dated by time T-1, then the neighbor, not having a full-fledged log for the period preceding T, will not be able to apply such a transaction to your database.

В описанном выше варианте сортировки лога транзакций по ID, состоящего из времени и ID актора, вопрос звучит как: "какой минимальный ID транзакции, который мы еще можем получить от других соседей?"In the case of sorting the transaction log by ID, described above, consisting of time and actor ID, the question is: "what is the minimum transaction ID that we can still get from other neighbors?"

Для установления "ясности" можно использовать следующие способы.The following methods can be used to establish "clarity".

КОНСЕНСУСCONSENSUS

Каждую транзакцию заверяют каждым агентом, имеющим право записи в область, большинством или отобранным по другим правилам множеством агентов, или даже просто сервером. Возможно, например, использовать алгоритм BLS (https://ru.wikipedia.org/wiki/BLS), позволяющий компактно хранить серию подписей, или использовать другой способ. Подход консенсуса не эффективен, плюс он потенциально допускает "отмену" транзакций, когда часть агентов, не успевших "проголосовать", вынуждены отменять транзакцию. Но в некоторых приложениях БД требуется консенсус/заверение/подпись в любом случае, например, при работе с криптовалютами, чтобы убедиться, что транзакция соответствует всем критериям безопасности, допустимости и т.п. Например, если это денежный перевод и мы хотим быть уверены, что и "плательщик" и "получатель" согласны с операцией и у нас есть достаточное число "свидетелей" и т.д. При этом консенсус по транзакции Б может быть выпущен только после того, как был достигнут консенсус по транзакции А (например, подпись каждой следующей транзакции должна включать заверяющую подпись предыдущей, стандартный blockchain), что автоматически даст и заверение транзакции, и отслеживание "ясности".Each transaction is authenticated by each agent with write access to the area, by a majority or otherwise selected set of agents, or even just by the server. It is possible, for example, to use the BLS algorithm (https://ru.wikipedia.org/wiki/BLS), which allows you to compactly store a series of signatures, or use another method. The consensus approach is not efficient, plus it potentially allows "cancellation" of transactions, when some of the agents who did not have time to "vote" are forced to cancel the transaction. But in some database applications, consensus/certification/signature is required in any case, for example, when working with cryptocurrencies, to make sure that the transaction meets all the criteria for security, validity, etc. For example, if it is a money transfer and we want to be sure that both the "payer" and the "recipient" agree with the transaction and we have a sufficient number of "witnesses", etc. At the same time, the consensus on transaction B can be released only after the consensus on transaction A has been reached (for example, the signature of each subsequent transaction must include the signature of the previous one, the standard blockchain), which will automatically give both the confirmation of the transaction and the tracking of "clarity".

ПУЛЬС + СЧЕТЧИКИ (Как достигается "ясность": как обнаружить пропущенные в локальном логе транзакции)PULSE + COUNTERS (How "clarity" is achieved: how to detect transactions missed in the local log)

1. ID транзакции включает инкрементальный счетчик транзакций каждого агента. Агент увеличивает значение счетчика на 1 в каждой следующей созданной транзакции (счетчик можно ротировать, например увеличивать до 255 и затем сбрасывать в 0),1. The transaction ID includes the incremental transaction counter of each agent. The agent increases the value of the counter by 1 in each next created transaction (the counter can be rotated, for example, increased to 255 and then reset to 0),

2. каждый агент имеет публичную (видимую в БД остальным агентам) "активную область", то есть перечень областей, в которые агент может вести запись, т.е. размещать новые транзакции,2. each agent has a public (visible in the database to other agents) "active area", that is, a list of areas in which the agent can write, i.e. place new transactions,

3. с заданной периодичностью агенты рассылают "пульс", содержащий информацию о текущем времени и о последнем ID транзакции, которую данный агент поместил в лог (а в этом ID присутствует описанный выше счетчик),3. Agents send out a "pulse" at a specified interval containing information about the current time and the last transaction ID that this agent placed in the log (and this ID contains the counter described above),

4. все агенты следят за полным перечнем соседей, имеющих право записи в каждую область в зоне их видимости и слушают их "пульс", также отслеживают свежие транзакции этих акторов,4. all agents keep track of the full list of neighbors that have the right to write to each area in their visibility zone and listen to their "pulse", they also track the latest transactions of these actors,

5. если счетчик пульса больше, чем счетчик последней транзакции соседа, или если последняя полученная транзакция соседа увеличила счетчик более, чем на 1, это означает, что сосед создал транзакцию, которой у агента нет и он запрашивает ее повтор у соседей,5. if the heartbeat counter is greater than the counter of the neighbor's last transaction, or if the neighbor's last received transaction increased the counter by more than 1, this means that the neighbor created a transaction that the agent does not have and he requests it to be repeated from the neighbors,

6. когда пульс и/или свежие транзакции от всех соседей с правом записи получены, агент точно будет знать, где находится "точка ясности" (меньше какого ID все помещенные в лог транзакции агенту уже известны).6. when the heartbeat and/or fresh transactions from all writeable neighbors are received, the agent will know exactly where the "clear point" is (less than what ID all logged transactions are already known to the agent).

Способ отличается простотой, но потенциальной проблемой является непредвиденное "выпадение" отдельных агентов, например из-за обесточивания, которое создаст задержку в установлении "точки ясности" из-за отсутствия пульса и, следовательно, информации о последней транзакции "отключенных" агентов. Но "точка ясности" необходима, в основном, для оптимизации обмена снимками между агентами и система остается полностью работоспособной даже в ситуации, если аварийное событие случится и точка ясности "застрянет" после (не продвинется дальше) первой транзакции в логе. При нештатном отключении агентов, как вариант, сервер или другой авторизованный агент, обнаружив потерявшего связь "агента", может выпустить "задним числом" транзакцию, удаляющую выпавшего агента из числа "активных агентов" в момент, когда была потеряна связь, после чего процедура установления ясности штатно продолжит работать.The method is simple, but a potential problem is the unforeseen "falling out" of individual agents, for example due to a power outage, which will create a delay in establishing a "point of clarity" due to the lack of a heartbeat and, therefore, information about the last transaction of the "disconnected" agents. But the "point of clarity" is needed mainly to optimize the exchange of snapshots between agents and the system remains fully functional even if an emergency event occurs and the point of clarity "gets stuck" after (does not move further) the first transaction in the log. In case of an abnormal disconnection of agents, as an option, the server or other authorized agent, having detected the "agent" that has lost connection, can issue a "retroactive" transaction that removes the dropped agent from the list of "active agents" at the moment when the connection was lost, after which the establishment procedure clarity will continue to work normally.

Так же "узким местом" такой системы является появление соседей. Если, по каким-то причинам, агент не узнает, что у него появился новый сосед, агент не будет отслеживать его пульс и не узнает о том, что пропустил транзакции. Эту проблему можно решить принудительной рассылкой транзакций типа "смена активной зоны", например, через выделенный агент-сервер, гарантирующий доставку всех транзакций типа "появление соседа". Возможно принудительно ничего не рассылать, а считать все дальние области "неясными" и определять ясность для них не слушая пульс, а слушая подтверждения ясности, включающее "ID прошлой транзакции" от агентов, имеющих право записи в область. При этом можно дополнительно принудительно рассылать транзакции для "пустых областей" (при входе агента в область, где никого нет и при выходе "последнего" агента из области). Этот способ (сочетание "ясности, определяемой агентами, имеющими право записи в область и принудительной рассылки транзакций для пустых областей) хорошо работает, если каждый агент имеет зону видимости (область, данные из которой агент читает) с запасом покрывающую "активную зону", например если агент может писать только в одну область 2-х мерной БД, то читать может в эту область и в 8 прилегающих областей.Also, the "bottleneck" of such a system is the appearance of neighbors. If, for some reason, the agent does not know that he has a new neighbor, the agent will not track his pulse and will not know that he missed transactions. This problem can be solved by forcing "core change" type transactions, for example, through a dedicated agent-server that guarantees the delivery of all "neighbor arrival" type transactions. It is possible to force nothing to be sent, but to consider all far areas "unclear" and determine the clarity for them not by listening to the pulse, but by listening to the clarity confirmation, including the "last transaction ID" from agents with write access to the area. In this case, it is possible to additionally force transactions to be sent for "empty areas" (when an agent enters an area where there is no one and when the "last" agent leaves the area). This method (a combination of "clearness defined by agents that have write access to the area and forced transactions for empty areas) works well if each agent has a visibility zone (the area from which the agent reads data) with a margin covering the "active zone", for example if an agent can only write to one area of a 2D database, then it can read to this area and 8 adjacent areas.

СПОСОБ ДИСТРИБУЦИИ БДDB DISTRIBUTION METHOD

Предлагаемая БД может существовать как в виде библиотеки, так и в виде отдельного приложения, доступного в форме "сервера" простым NOSQL-клиентам, например по протоколу memcached (https://github.com/memcached/memcached/blob/master/doc/protocol.txt).The proposed database can exist both as a library and as a separate application available in the form of a "server" to simple NOSQL clients, for example, via the memcached protocol (https://github.com/memcached/memcached/blob/master/doc/ protocol.txt).

При настройке администратор БД описывает (в конфигурационном файле или в программном коде) размерность и структуру БД, типы и полномочия агентов, методы (либо произвольные программные процедуры) валидации (удостоверения) транзакций и другие параметры, после чего либо интегрирует библиотеку в свое программное обеспечение, где работа с БД является частью другого функционала, либо запускает БД на своей ЭВМ.When setting up, the database administrator describes (in the configuration file or in the program code) the dimension and structure of the database, types and powers of agents, methods (or arbitrary program procedures) of transaction validation (certification) and other parameters, after which he either integrates the library into his software, where working with the database is part of another functionality, or runs the database on your computer.

Claims (45)

1. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве, заранее разбитом на топологические, в том числе геометрические, топографические, области, включающий сбор информации средствами сбора, находящимися на устройствах, имеющих координаты в описываемом пространстве и способных обмениваться между собой информацией, всех вместе образующих связный граф, размещение информации, относящейся к топологической области, на средствах хранения информации, расположенных на указанных подключенных к сообществу устройствах, имеющих в этот момент координаты в пределах этой области и соседних областей, обмен информацией с устройствами, имеющими координаты в этой или других, преимущественно смежных, областях, удаление информации, касающейся топологической области, при изменении координат устройства на другие, удаленные от данной области, 1. A method for collecting, storing, updating and processing information about an n-dimensional space, previously divided into topological, including geometric, topographic, areas, including the collection of information by means of collection located on devices that have coordinates in the described space and are capable of exchanging between information that all together form a connected graph, placement of information related to the topological area, on information storage facilities located on the specified devices connected to the community, which at that moment have coordinates within this area and neighboring areas, exchange of information with devices having coordinates in this or other, mostly adjacent, areas, deletion of information relating to the topological area, when changing the coordinates of the device to others remote from this area, причем запись и изменение информации осуществляют через распределенный лог операций (DLT), где каждая операция изменяет данные только о заранее фиксированном наборе указанных выделенных областей n-мерного пространства, moreover, the recording and modification of information is carried out through a distributed log of operations (DLT), where each operation changes data only about a pre-fixed set of specified selected areas of the n-dimensional space, причем полный лог всех операций хранят в виде набора выборок из этого полного лога, где каждая выборка состоит из полного перечня операций, относящихся к конкретной топологической области, moreover, the complete log of all operations is stored as a set of samples from this complete log, where each sample consists of a complete list of operations related to a particular topological area, причем каждое устройство хранит у себя перечень всех подключенных к сообществу устройств, имеющих координаты в своей и смежных областях пространства, moreover, each device stores a list of all devices connected to the community that have coordinates in its own and adjacent areas of space, причем устройства, имеющие координаты внутри топологической области, передают другим устройствам, имеющим координаты внутри этой же области и/или в прилегающих областях, информацию в процессе записи, moreover, devices having coordinates inside the topological area transmit information to other devices having coordinates inside the same area and / or in adjacent areas during the recording process, причем информацию об операциях с данными устройство-инициатор записывает в локальную память первоначально в статусе "не согласована", затем устройство-инициатор рассылает информацию прямо или посредством пересылки всем остальным устройствам, имеющим координаты в той же области, что и устройство-инициатор и в смежных областях, и указанной информации устройство-инициатор назначает статус "согласована" после того, как все остальные устройства из той же и смежных областей пришли к "консенсусу" о том, что транзакция успешно зарегистрирована, т.е. получена всеми устройствами-адресатами.moreover, the initiating device writes information about data operations to the local memory initially in the "inconsistent" status, then the initiating device sends information directly or by sending it to all other devices that have coordinates in the same area as the initiating device and in adjacent areas, and the specified information, the initiating device assigns the status "consistent" after all other devices from the same and adjacent areas have come to a "consensus" that the transaction has been successfully registered, i.e. received by all destination devices. 2. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 1, в котором "консенсус" фиксируется после подтверждения получения информации от всех устройств в той же и смежных областях. 2. The method for collecting, storing, updating and processing information about the n-dimensional space according to claim 1, in which the "consensus" is fixed after confirmation of receipt of information from all devices in the same and adjacent areas. 3. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 1, в котором при обмене сообщениями между устройствами осуществляют ассиметричное шифрование сообщений. 3. The method of collecting, storing, updating and processing information about the n-dimensional space according to claim 1, in which, when exchanging messages between devices, asymmetric encryption of messages is carried out. 4. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 1, в котором при обмене сообщениями между устройствами сообщения снабжают электронной подписью, позволяющей гарантировать подлинность сообщений. 4. The method of collecting, storing, updating and processing information about the n-dimensional space according to claim 1, in which, when exchanging messages between devices, messages are provided with an electronic signature, which makes it possible to guarantee the authenticity of messages. 5. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 1 или 2, в котором 5. The method of collecting, storing, updating and processing information about the n-dimensional space according to claim 1 or 2, in which - каждое устройство хранит у себя информацию о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами в сообществе для своей и смежных областей; - each device stores information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices in the community for its own and adjacent areas; - новую транзакцию о своей области записывают в локальную память каждого устройства в статусе "принята"; - a new transaction about its area is written to the local memory of each device in the status "accepted"; - при этом каждое устройство отслеживает все изменения, вносимые другими устройствами, имеющими координаты в той же области, где находится устройство, и в смежных областях, а также периодически рассылает всем соседним устройствам информацию о том, какая транзакция была записана этим устройством последней, или информацию о том, что запись не осуществлялась; - at the same time, each device monitors all changes made by other devices that have coordinates in the same area where the device is located and in adjacent areas, and also periodically sends information to all neighboring devices about which transaction was recorded last by this device, or information that the recording was not carried out; - каждое устройство отслеживает полноту своего лога операций и запрашивает пропущенные транзакции, если о них узнаёт, либо обновляет для себя информацию об операции, перед которой этому устройству все операции известны. - each device monitors the completeness of its operation log and requests missed transactions if it learns about them, or updates information about the operation for itself, before which all operations are known to this device. 6. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 1, в котором существует одно и более устройство с функциями сервера, которое выполняет по крайней мере первичную авторизацию устройств, проксирование информации и организацию P2P взаимодействия между агентами. 6. The method of collecting, storing, updating and processing information about the n-dimensional space according to claim 1, in which there is one or more device with server functions that performs at least the primary authorization of devices, proxying information and organizing P2P interaction between agents. 7. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 6, в котором указанный сервер не принадлежит сообществу и не имеет координат в указанном n-мерном пространстве. 7. The method of collecting, storing, updating and processing information about the n-dimensional space according to claim 6, in which the specified server does not belong to the community and does not have coordinates in the specified n-dimensional space. 8. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 1, в котором любое из устройств при входе в указанную n-мерную область проходит процедуру авторизации. 8. The method for collecting, storing, updating and processing information about the n-dimensional space according to claim 1, in which any of the devices, upon entering the specified n-dimensional area, passes the authorization procedure. 9. Способ сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 1, в котором любому из устройств назначают дополнительно более широкие или урезанные права доступа к данным, расширенные или сокращенные обязанности, другие доп. обязанности или ограничения по сравнению с другими устройствами-участниками сообщества. 9. The method of collecting, storing, updating and processing information about the n-dimensional space according to claim 1, in which any of the devices is assigned additionally broader or truncated data access rights, extended or reduced responsibilities, other additional. responsibilities or restrictions compared to other devices in the community. 10. Динамическая система сбора, обработки, обмена и размещения информации об n-мерном пространстве, включающая 10. Dynamic system for collecting, processing, exchanging and placing information about n-dimensional space, including - n-мерное пространство, предварительно разделенное на топологические области; - n-dimensional space, previously divided into topological areas; - одно или более устройство, которому присвоены координаты в n-мерном пространстве, снабженное одним или более средством сбора информации, средством хранения информации, средством связи с другими устройствами, с возможностью перемещения как внутри одной топологической области, так в любую из смежных топологических областей, - one or more devices assigned coordinates in n-dimensional space, equipped with one or more means of collecting information, a means of storing information, a means of communication with other devices, with the ability to move both within one topological area and to any of the adjacent topological areas, причем указанная информация, содержит в том числе логический адрес, moreover, the specified information contains, among other things, a logical address, причем средство хранения информации дополнительно включает средство хранения статуса информации, частичный лог - выборку из общего распределенного лога транзакций, moreover, the information storage means additionally includes an information status storage means, a partial log - a selection from the general distributed transaction log, причем в частичном и полном логе операций каждой операцией изменяются данные только о заранее фиксированном наборе указанных выделенных областей n-мерного пространства, moreover, in the partial and full log of operations, each operation changes data only on a pre-fixed set of specified selected areas of the n-dimensional space, причем полный лог всех операций хранится в виде набора выборок из этого полного лога, и каждая указанная выборка состоит из полного перечня операций, относящихся к конкретной топологической области, moreover, the complete log of all operations is stored as a set of samples from this complete log, and each specified sample consists of a complete list of operations related to a particular topological area, причем информация о текущей области записана в локальную память устройство-инициатор первоначально в статусе "не согласована", затем после подтверждения - в статусе "согласована". moreover, information about the current area is recorded in the local memory of the initiating device, initially in the "not agreed" status, then after confirmation - in the "agreed" status. 11. Динамическая система сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 10, в которой в логическом адресе каждого фрагмента информации обязательно присутствует уникальный идентификатор, однозначно определяющий область, к которой принадлежит данная запись. 11. The dynamic system for collecting, storing, updating and processing information about the n-dimensional space according to claim 10, in which the logical address of each piece of information necessarily contains a unique identifier that uniquely identifies the area to which this record belongs. 12. Динамическая система сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 10, в которой информация о каждой области пространства включает перечень всех подключенных к сообществу устройств, имеющих координаты в данной области. 12. A dynamic system for collecting, storing, updating and processing information about n-dimensional space according to claim 10, in which information about each area of space includes a list of all devices connected to the community that have coordinates in this area. 13. Динамическая система сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 10, в которой транзакция о текущей области записана в локальную память устройство-инициатор первоначально в статусе "принята". 13. The dynamic system for collecting, storing, updating and processing information about the n-dimensional space according to claim 10, in which the transaction about the current area is recorded in the local memory of the initiating device initially in the "accepted" status. 14. Динамическая система сбора, хранения, обновления и обработки информации об n-мерном пространстве по п. 10, в которой существует одно и более устройство с функциями сервера для первичной авторизации устройств, проксирования информации и организации P2P взаимодействия между агентами, не принадлежащее сообществу и не имеющее координат в указанном n-мерном пространстве. 14. A dynamic system for collecting, storing, updating and processing information about the n-dimensional space according to claim 10, in which there is one or more devices with server functions for primary authorization of devices, proxying information and organizing P2P interaction between agents that does not belong to the community and having no coordinates in the specified n-dimensional space. 15. Размещенная на компьютере система для сбора, обработки, обмена и размещения информации в области n-мерного пространства, включающая информационную шину, присоединенный к информационной шине процессор, устройство сбора информации, устройство памяти, 15. A computer-based system for collecting, processing, exchanging and placing information in an n-dimensional space, including an information bus, a processor attached to the information bus, an information collection device, a memory device, - содержащая инструкции для сбора информации, обмена данными с другими устройствами, находящимися в n-мерном пространстве, - containing instructions for collecting information, exchanging data with other devices located in the n-dimensional space, - дополнительно содержащая инструкции устройствам, имеющим координаты внутри топологической области передавать другим устройствам, имеющим координаты внутри этой же области и смежных областях, информацию в процессе записи, - additionally containing instructions for devices having coordinates inside the topological area to transfer information to other devices having coordinates inside the same area and adjacent areas during the recording process, - дополнительно содержащая инструкции, что каждая процедура записи данных в область состоит из- additionally containing instructions that each procedure for writing data to the area consists of • первичной записи в локальную память одного устройства, • primary recording in the local memory of one device, • назначения первичной записи статуса "не согласована", • assignment of the primary record of the status "inconsistent", • рассылки (прямой или посредством пересылки) данных другим устройствам в этой же области, соседям в смежных областях, • broadcasting (direct or by forwarding) data to other devices in the same area, neighbors in adjacent areas, • получения ответа от всех соседних устройств в пределах области и смежных областей, что данные приняты, • receiving a response from all neighboring devices within the area and adjacent areas that data has been received, • назначения первичной записи статуса "согласована".• assignment of the primary record of the status "agreed". 16. Размещенная на компьютере система по п. 15, дополнительно содержащая инструкции: назначить одному из устройств функции сервера для первичной авторизации устройств, проксирования информации и организации P2P взаимодействия между агентами, не принадлежащего сообществу и не имеющему координат в указанном n-мерном пространстве. 16. The system hosted on a computer according to claim 15, additionally containing instructions: assign server functions to one of the devices for primary authorization of devices, proxying information and organizing P2P interaction between agents that does not belong to the community and does not have coordinates in the specified n-dimensional space. 17. Размещенная на компьютере система по п. 15, дополнительно содержащая инструкции: 17. A computer-hosted system according to claim 15, additionally containing instructions: • каждому устройству хранить у себя информацию о последней операции, затрагивающей свою и любую из смежных областей, ранее которой устройству известны все операции, совершенные всеми устройствами в сообществе для своей и смежных областей; • each device to store information about the last operation affecting its own and any of the adjacent areas, before which the device knows all the operations performed by all devices in the community for its own and adjacent areas; • каждому устройству записывать в локальную память (средство хранения) устройства в статусе "принята" новую информацию о своей области; • each device to write to the local memory (storage medium) of the device in the "accepted" status new information about its area; • каждому устройству отслеживать все изменения, вносимые другими устройствами, имеющими координаты в той же области, где находится устройство, и в смежных областях, а также периодически рассылать всем соседним устройствам информацию о том, какая транзакция была записана этим устройством последней, или информацию о том, что запись не осуществлялась, • each device keep track of all changes made by other devices that have coordinates in the same area where the device is located and in adjacent areas, as well as periodically send information to all neighboring devices about which transaction was last written by this device, or information about that no recording has been made, • каждому устройству отслеживать полноту своего лога операций и запрашивать пропущенные транзакции, если о них узнаёт, либо обновлять для себя информацию об операции, перед которой этому устройству все операции известны.• each device should keep track of the completeness of its operation log and request missed transactions if it learns about them, or update information about the operation for itself, before which all operations are known to this device.
RU2021119997A 2021-07-07 2021-07-07 Dynamically allocated database with topological information binding RU2780979C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/RU2022/050203 WO2023282793A2 (en) 2021-07-07 2022-06-27 Dynamically hosted database with topological data binding.

Publications (1)

Publication Number Publication Date
RU2780979C1 true RU2780979C1 (en) 2022-10-04

Family

ID=

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8276084B2 (en) * 2009-06-01 2012-09-25 International Business Machines Corporation Peer-to-peer based content delivery in a virtual universe
US9015177B2 (en) * 2010-10-20 2015-04-21 Microsoft Technology Licensing, Llc Dynamically splitting multi-tenant databases
RU2639940C2 (en) * 2013-10-18 2017-12-25 Нью Йорк Эйр Брэйк, ЛЛСи Dynamically measurable distributed heterogeneous platform of relational database
US20190361882A1 (en) * 2017-03-15 2019-11-28 Fauna, Inc. Methods and systems for a database
US10825024B1 (en) * 2019-04-12 2020-11-03 Symbiont.Io, Inc. Systems, devices, and methods for DLT-based data management platforms and data products

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8276084B2 (en) * 2009-06-01 2012-09-25 International Business Machines Corporation Peer-to-peer based content delivery in a virtual universe
US9015177B2 (en) * 2010-10-20 2015-04-21 Microsoft Technology Licensing, Llc Dynamically splitting multi-tenant databases
RU2639940C2 (en) * 2013-10-18 2017-12-25 Нью Йорк Эйр Брэйк, ЛЛСи Dynamically measurable distributed heterogeneous platform of relational database
US20190361882A1 (en) * 2017-03-15 2019-11-28 Fauna, Inc. Methods and systems for a database
US10825024B1 (en) * 2019-04-12 2020-11-03 Symbiont.Io, Inc. Systems, devices, and methods for DLT-based data management platforms and data products

Similar Documents

Publication Publication Date Title
Wang et al. Sok: Sharding on blockchain
US10887389B2 (en) Decentralized immutable storage blockchain configuration
CN112104517B (en) Data processing method based on block chain network and related device
Wallach A survey of peer-to-peer security issues
KR102026580B1 (en) A control system for unmanned moving vechicle using blockchain and a control method thereof
CN110945548A (en) Computer-implemented system and method for managing large distributed storage pools in a blockchain network
EP2843901B1 (en) Peer-to-peer relay network
CN113395363B (en) Data processing method, device and equipment based on block chain and storage medium
AU2016316777A1 (en) Methods and apparatus for a distributed database within a network
EP3616358A1 (en) Distributed privately subspaced blockchain data structures with secure access restriction management
Hassanzadeh-Nazarabadi et al. Lightchain: A dht-based blockchain for resource constrained environments
CN108140031A (en) Equity can synchronize storage system
CN112433856A (en) Decentralization autonomous decision-making method for unmanned plane swarm network
CN105007302B (en) A kind of mobile terminal data storage method
KR102039852B1 (en) A communication control system for unmanned moving vechicle using blockchain and a communication method thereof
CN110839056B (en) Data processing method and device based on block chain and node network
CN111597077B (en) Data processing method, data processing device, computer equipment and storage medium
Zhao et al. Evaluating DAG-based blockchains for IoT
CN109450685B (en) local link node offline consensus method and node
CN112116349B (en) High-throughput-rate-oriented random consensus method and device for drawing account book
RU2780979C1 (en) Dynamically allocated database with topological information binding
CN113037824B (en) Cloud computing-oriented high-performance block chain construction method
WO2023282793A2 (en) Dynamically hosted database with topological data binding.
KR102542063B1 (en) A terminal device and a method for consturcting secure block chain based on neural block clusters
KR20190124107A (en) method of processing weight-based blockchain consensus by master nodes of subunit networks