Joint simulation method, device and computer equipment based on sender interest matching
By matching and filtering at the sending end, the problem of redundant data transmission in the large -scale combined simulation system is solved, and the real -time and reliability of the network bandwidth utilization and the simulation system is improved.
Patent Information
- Application Number
- CN202411512909.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In large-scale joint simulation systems, the transmission of redundant data consumes a large amount of network resources, resulting in congestion in transmission data, increasing transmission delay, and seriously affecting the real-time and reliability of the simulation system.
Adopt a joint simulation method based on the matching end interest matching, to obtain the interest area message of each receiving end from the simulation server and store it in the index table through the sending terminal. Filter before sending data to reduce the transmission of redundant data.
Effectively reduce the transmission of redundant data in the network, improve the utilization of network bandwidth, reduce the calculation burden of simulation services and receiving end, and enhance the real -time and reliability of the simulation system.
Smart Images

Figure CN119025569B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of simulation data processing, and in particular to a joint simulation method, apparatus and computer equipment based on sending end interest matching. Background Art
[0002] With the rapid development of distributed simulation technology, the scale of joint simulation continues to expand. Large-scale joint simulation systems transmit simulation data based on the network. The large scale of nodes leads to a large amount of redundant data during the simulation process. In the case of limited network bandwidth resources, the transmission of these redundant data consumes a lot of network resources, resulting in congestion in the transmission data, increasing the transmission delay, and seriously affecting the real-time and reliability of the simulation system. In order to reduce the transmission of redundant data in the network and improve bandwidth utilization, it is necessary to provide an efficient data filtering method.
[0003] Data filtering in existing simulation systems mainly involves data matching at the server or receiving end, which cannot fundamentally solve the problem of redundant data transmission in the network. It also increases the processing pressure on the server and the data filtering pressure on the receiving end, and competes with node simulation applications for computing resources and bandwidth resources. Some methods use a filtering mechanism based on area matching to filter data by comparing whether the areas of the sender and the receiver overlap. This method cannot accurately filter all redundant data and still requires adding secondary filtering and matching at the receiving end, which causes the problem of repeated matching. Summary of the invention
[0004] Based on this, it is necessary to provide a joint simulation method, device and computer equipment based on sender interest matching to address the above technical problems.
[0005] A joint simulation method based on sending end interest matching, the method comprising:
[0006] The sending end obtains the region of interest messages of each receiving end from the simulation server and stores them in the index table; the region of interest messages include the region of interest of each attribute of the target entity; the index table is used to store the region of interest messages according to the entity, region of interest and attribute constraint conditions;
[0007] The sending end calls the data matching interface to perform interest matching on the entity data to be sent, including: obtaining the entity data to be sent, searching the corresponding interest area and its attribute constraints in the index table according to the entity handle of the entity data, traversing the index results in turn, and performing interest matching on the current index result and the entity data according to a preset index matching method. If the match fails, the simulation unit handle to which the interest area in the current index result belongs is saved to the simulation unit handle set;
[0008] The sending end packages the simulation unit handle set and the entity data and sends them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server does not perform any operation. The simulation server sends the entity data to the successfully matched receiving end according to the pre-built publication subscription relationship.
[0009] A joint simulation device based on sending end interest matching, the device comprising:
[0010] A message storage module is used for the sending end to obtain the interest area messages of each receiving end from the simulation server and store them in the index table; the interest area message includes the interest area of each attribute of the target entity; the index table is used to store the interest area message according to the entity, interest area and attribute constraint conditions;
[0011] The interest matching module is used for the sending end to call the data matching interface to perform interest matching on the entity data to be sent, including: obtaining the entity data to be sent, searching the corresponding interest area and its attribute constraint conditions in the index table according to the entity handle of the entity data, traversing the index results in turn, and performing interest matching on the current index result and the entity data according to the preset index matching method. If the match fails, the simulation unit handle to which the interest area in the current index result belongs is saved to the simulation unit handle set;
[0012] The data sending module is used for the sending end to package the simulation unit handle set and the entity data and send them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server has no operation. The simulation server sends the entity data to the successfully matched receiving end according to the pre-built published subscription relationship.
[0013] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0014] The sending end obtains the region of interest messages of each receiving end from the simulation server and stores them in the index table; the region of interest messages include the region of interest of each attribute of the target entity; the index table is used to store the region of interest messages according to the entity, region of interest and attribute constraint conditions;
[0015] The sending end calls the data matching interface to perform interest matching on the entity data to be sent, including: obtaining the entity data to be sent, searching the corresponding interest area and its attribute constraints in the index table according to the entity handle of the entity data, traversing the index results in turn, and performing interest matching on the current index result and the entity data according to a preset index matching method. If the match fails, the simulation unit handle to which the interest area in the current index result belongs is saved to the simulation unit handle set;
[0016] The sending end packages the simulation unit handle set and the entity data and sends them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server does not perform any operation. The simulation server sends the entity data to the successfully matched receiving end according to the pre-built publication subscription relationship.
[0017] The above-mentioned joint simulation method, device and computer equipment based on the interest matching of the sender send the interest area information of the receiving end to the sender by means of message callback, and the sender performs data filtering, and determines which receiving ends can receive the entity data before the data is sent, so as to avoid a large amount of redundant data being transmitted in the network, and at the same time, the calculation required for data filtering is dispersed to each sender, thereby reducing the calculation burden of the simulation service and the receiving end. Compared with the region-based filtering algorithm, the content-based filtering algorithm can accurately filter all data that does not meet the conditions with only one calculation, and there is no need to add secondary filtering at the receiving end to repeatedly match the same data, thereby reducing the possibility of snatching computing resources and bandwidth resources with node simulation applications. At the same time, since the content-based filtering does not need to establish a TCP / IP connection between the sender and the receiving end, it can avoid the problem of connection occupation and multicast address reuse causing network congestion when the number of interest areas is too large. The embodiment of the present invention can reduce the transmission of a large amount of redundant data during the simulation operation process, improve the utilization rate of network bandwidth, and enhance the ability to build a large virtual world. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 1 is a flow chart of a joint simulation method based on sending end interest matching in one embodiment;
[0019] Figure 2 A schematic diagram of the index relationship between entities, interest areas, and attribute constraints in one embodiment;
[0020] Figure 3 A schematic diagram of a process for constructing a publishing subscription relationship based on mapping between object classes and interaction classes in one embodiment;
[0021] Figure 4 A schematic diagram of a process flow of publishing an object class in one embodiment;
[0022] Figure 5 A schematic diagram of a process of canceling the publication of an object class in one embodiment;
[0023] Figure 6 A schematic diagram of an interactive process flow is disclosed in one embodiment;
[0024] Figure 7 A schematic diagram of a process of canceling a publication interaction in one embodiment;
[0025] Figure 8A schematic diagram of a process of ordering an object class in one embodiment;
[0026] Fig. 9 A schematic diagram of a process of canceling a subscription object class in one embodiment;
[0027] Fig.10 A schematic diagram of an ordering interaction process in an embodiment;
[0028] Fig.11 A schematic diagram of an interactive process for canceling a subscription in one embodiment;
[0029] Fig.12 A schematic diagram of a process of comparing entity data with constraint conditions of an area of interest in one embodiment;
[0030] Fig.13 A schematic diagram of a data filtering process in an embodiment;
[0031] Fig.14 is a structural block diagram of a joint simulation device based on sending end interest matching in one embodiment;
[0032] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] The present invention is implemented based on the KD-JLink (distributed simulation middleware) system. KD-JLink is usually composed of a central server and multiple nodes. Each node is connected to the simulation service as a simulation unit. In the KD-JLink system, when the simulation unit publishes an entity message, the message is first sent to the simulation service, and then forwarded to other simulation units by the simulation service. For this simulation system that interacts data through a central server, the present invention adopts a three-level mode content-based data filtering algorithm to achieve accurate filtering of redundant data during the simulation operation process.
[0035] In one embodiment, Figure 1 As shown, a joint simulation method based on sender interest matching is provided, comprising the following steps:
[0036] Step 102: The sending end obtains the area of interest information of each receiving end from the simulation server and stores it in the index table.
[0037] The region of interest message includes the region of interest of each attribute of the target entity; the index table is used to store the region of interest message according to the entity, the region of interest and the attribute constraint condition.
[0038] The constraints imposed by the receiving end on the entity are collectively referred to as the region of interest. The region of interest is an ordered set of all attributes of the entity and their intervals (the order of the attributes in the constraint set is consistent with the order of the attributes in the public data model file), which can be expressed as , where E is the region of interest, n is the number of entity attributes, and E n It is a four-tuple consisting of attribute name, attribute data type, region lower limit, and region upper limit, recorded as N is the attribute name, T is the attribute E m The enumeration value of the data type, ,For user-defined composite data types, they need to be parsed into basic data types. The composition of the area of interest is shown in Table 1:
[0039] Table 1 Composition of interest areas
[0040]
[0041] like Figure 2 As shown, a schematic diagram of the index relationship between an entity, an area of interest, and an attribute constraint is provided. In order to improve the matching efficiency, the present invention adopts a three-level index table based on "entity-area of interest-attribute constraint". The entity can be regarded as a tree with multiple nodes, each node corresponds to an area of interest, and the same area of interest can also be regarded as a tree with multiple nodes, each node corresponds to an attribute constraint. The index table uses data structures such as red-black trees for storage, and the internal elements are ordered, so it has a higher search efficiency. The attribute constraint condition establishes corresponding branches according to the basic data types supported by the simulation system, and the comparison method is selected in the branch based on the characteristics of the data type. When filtering, the corresponding area of interest and its attribute constraints can be quickly found through the entity handle, and the corresponding data type branch is entered to enter the judgment.
[0042] In step 104, the sending end calls the data matching interface to perform interest matching on the entity data to be sent, including: obtaining the entity data to be sent, searching the corresponding interest area and its attribute constraints in the index table according to the entity handle of the entity data, traversing the index results in turn, and performing interest matching on the current index result and the entity data according to a pre-set index matching method. If the match fails, the simulation unit handle to which the interest area in the current index result belongs is saved in the simulation unit handle set.
[0043] The receiving end determines the interest area of the entity and sends the interest area information to the simulation service by calling the interface. The simulation service passes the interest area message of the receiving end to all the sending ends that publish the entity in the form of a callback function. The sending end filters the entity data to be sent according to the interest area of the receiving end (from the receiving end calling the interface to receiving the interest area message within one simulation step). The sending end uses a content filtering-based algorithm to determine whether the entity data to be sent is within the interest area, thereby deciding whether the entity data should be sent to the simulation unit to which the interest area belongs. Compared with the receiving end filtering method, the data matching work of the sending end filtering method is completed before the message is sent, which fundamentally reduces the amount of data sent in the network, improves the effective transmission efficiency of the sending end and the receiving end, and reduces the processing pressure of the server and the receiving end. For joint simulation, sending end filtering is more meaningful.
[0044] Step 106, the sending end packages the simulation unit handle set and the entity data and sends them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server does not perform any operation. The simulation server sends the entity data to the successfully matched receiving end according to the pre-built published subscription relationship.
[0045] By constructing a publication and subscription relationship criterion, the publication and subscription of the object class and the interaction class of the simulation unit are uniformly managed, and the same understanding is achieved in the joint simulation. The publication and subscription relationship construction method based on the mapping of object class and interaction class can filter the data of both the sender and receiver at the class level according to the data (object class and interaction class) requirements of each simulation unit in the joint simulation, thereby reducing the communication volume in the network.
[0046] In the above-mentioned joint simulation method based on the interest matching of the sending end, the sending end obtains the interest area message of each receiving end from the simulation server and stores it in the index table; the interest area message includes the interest area of each attribute of the target entity; the index table is used to store the interest area message according to the entity, interest area and attribute constraint conditions; the sending end obtains the entity data to be sent, searches the corresponding interest area and its attribute constraint conditions in the index table according to the entity handle of the entity data, traverses the index results in turn, and matches the current index result with the entity data according to the preset index matching method. If the match fails, the simulation unit handle to which the interest area belongs in the current index result is saved to the simulation unit handle set; the sending end packages the simulation unit handle set and the entity data and sends them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server has no operation, and the simulation server sends the entity data to the successfully matched receiving end according to the pre-built publication subscription relationship. The embodiment of the present invention can be used to reduce the transmission of useless data in a large-scale simulation process and realize efficient data filtering.
[0047] In one embodiment, Figure 3 As shown, a flow chart of constructing a publishing subscription relationship based on mapping between object classes and interaction classes is provided. Constructing the publishing subscription relationship includes:
[0048] Step 302: The simulation service allocates an object class handle and an interaction class handle to the object class and the interaction class respectively.
[0049] Step 304, when declaring events of the object class and the interaction class, the simulation unit calls the object class active call interface and the interaction class active call interface of the dynamic library respectively, obtains the corresponding publication subscription relationship, and generates a corresponding request according to the publication subscription relationship.
[0050] Step 306, the simulation unit obtains the object class handle and the interaction class handle respectively, and initiates corresponding requests to the simulation service through the object class handle and the interaction class handle. The simulation service performs the adding or deleting operation of the publishing subscription relationship on the corresponding relationship set in the association container according to the request.
[0051] In step 302, object classes refer to classes that represent specific entities or objects in the simulation system. Each object class represents a physical unit in the simulation environment, such as a vehicle, an aircraft, etc. These classes define the state and behavior of the object through attributes and methods. The definition and registration of object classes are usually completed in the simulation system so that the simulation units can recognize and interact.
[0052] Interaction classes are used to define the communication or data exchange between simulation units. For example, in an unmanned platform confrontation simulation, an interaction class can define the behavior of one unit passing information to another unit. The registration and management of interaction classes are implemented through specific interface devices to ensure that information can be effectively exchanged between simulation units.
[0053] At the beginning of the simulation, the simulation service will assign a unique handle in the joint simulation to the object class and the interaction class. This handle plays a key role in the joint simulation. As a unique identifier, it ensures that all operations of the object class and the interaction class are performed through this handle. This mechanism helps to maintain the independence and consistency of different objects and interaction classes in the simulation process and avoid confusion or conflict. The method of the present invention manages the publication and subscription relationship of the object class and the interaction class based on the handle.
[0054] After the simulation service assigns a handle to an object class and an interaction class, all subsequent operations, such as state change, event triggering, data transmission, etc., must be performed through the handle. The method of the present invention manages the publishing and subscription relationship of the object class and the interaction class based on the handle. This mechanism not only improves the management efficiency of the simulation, but also ensures accurate communication and coordination between modules in the distributed simulation system.
[0055] In step 304, the publishing subscription relationship includes the publishing relationship or subscription relationship of the current simulation unit to the target object class or interaction class; the publishing relationship includes publishing requirements and canceling publishing requirements; the subscription relationship includes subscription requirements and canceling subscription requirements.
[0056] The method of the present invention adopts the form of C++ dynamic library to provide 8 active calling interfaces for the simulation unit, namely, PublishObjectClass (publishing object class), UnPublishObjectClass (cancel publishing object class), PublishInteractionClass (publishing interaction class), UnPublishInteractionClass (cancel publishing interaction class), SubscribeObjectClass (subscribe object class), UnSubscribeObjectClass (cancel subscribe object class), SubscribeInteractionClass (subscribe interaction class) and UnSubscribeInteractionClass (cancel subscribe interaction class). The simulation unit can declare their intention to produce and consume messages (object class and interaction class) to the joint simulation by calling these interfaces.
[0057] In step 306, the associative container set has the characteristics of unique and ordered elements and fast search speed. The method of the present invention uses set as the storage structure of the publication subscription relationship. The relationship set includes the object class publication relationship set, the object class subscription relationship set, the interaction class publication relationship set and the interaction class subscription relationship set.
[0058] In step 306, the simulation service performs the operation of adding or deleting the published subscription relationship on the corresponding relationship set in the associated container according to the request, including: when the simulation unit initiates a publication request or cancels a publication request of an object class or an interaction class to the simulation service, the simulation service performs the operation of adding or deleting the published subscription relationship on the object class publication relationship set or the interaction class publication relationship set in the associated container according to the request; when the simulation unit initiates a subscription request or cancels a subscription request of an object class or an interaction class to the simulation service, the simulation service performs the operation of adding or deleting the published subscription relationship on the object class subscription relationship set or the interaction class subscription relationship set in the associated container according to the request.
[0059] Specifically, the simulation service includes publishing object class service, canceling publishing object class service, subscribing object class service, canceling subscribing object class service, publishing interactive class service, canceling publishing interactive class service, subscribing interactive class service and canceling subscribing interactive class service.
[0060] like Figure 4As shown in the flowchart of object class publication, during the simulation operation phase, the simulation unit calls the object class publication service to declare to the joint simulation that the simulation unit can produce data of the specified object class. After receiving the request, the simulation service will save the publication relationship of the current simulation unit to the object class in the data storage. After the object class is successfully published, the simulation unit can register the object instance of the object class and update the object instance data. This service must be called once for each object class to be published, even if these object classes belong to the same class hierarchy. Subsequent businesses can query whether the specified object class is published through the IsObjectClassPublished (Is the object class published) service.
[0061] like Figure 5 As shown in the flowchart of unpublishing an object class, during the simulation running phase, the simulation unit calls the unpublishing object class service to declare to the joint simulation that the simulation unit will no longer produce data of the specified object class. After receiving the request, the simulation service will delete the publication relationship of the current simulation unit to the object class in the data storage. After successfully unpublishing the object class, the simulation unit is no longer responsible for updating the object instance data of the object class.
[0062] like Figure 6 The schematic diagram of the published interaction class process is shown. During the simulation running phase, the simulation unit calls the published interaction class service to declare to the joint simulation that the simulation unit can produce data of the specified interaction class. After receiving the request, the simulation service will save the current simulation unit's publication relationship for the interaction class in the data storage. After the interaction class is successfully published, the simulation unit can update the data of the interaction class. This service must be called once for each interaction class to be published, even if these interaction classes belong to the same class hierarchy. Subsequent businesses can query whether the specified interaction class is published through the IsInteractionClassPublished service.
[0063] like Figure 7 The flowchart of canceling the publication of interaction classes is shown in the figure. During the simulation running phase, the simulation unit calls the cancel publication service of the interaction class to declare to the joint simulation that the simulation unit will no longer produce data of the specified interaction class. After receiving the request, the simulation service will delete the publication relationship of the current simulation unit to the interaction class in the data storage. After the interaction class is successfully canceled, the simulation unit is no longer responsible for updating the data of the interaction class.
[0064] like Figure 8 As shown in the flowchart of ordering object classes, during the simulation running phase, the simulation unit calls the ordering object class service to declare to the joint simulation that the simulation unit can consume the object instance data of the specified object class. After receiving the request, the simulation service will save the ordering relationship of the current simulation unit to the object class in the data storage.
[0065] like Fig. 9 As shown in the flowchart of cancelling the object class subscription, during the simulation running phase, the simulation unit calls the cancelling object class subscription service to declare to the joint simulation that the simulation unit no longer consumes the data of the specified object class. After receiving the request, the simulation service will delete the subscription relationship of the current simulation unit to the object class in the data storage.
[0066] like Fig.10 As shown in the flowchart of ordering interaction classes, during the simulation running phase, the simulation unit calls the ordering interaction class service to declare to the joint simulation that the simulation unit can consume the data of the specified interaction class. After receiving the request, the simulation service will save the subscription relationship of the current simulation unit to the interaction class in the data storage. After the ordering of the interaction class is successful, when a simulation unit in the joint simulation updates the data of the interaction class, the simulation service will forward the interaction class data to the current simulation unit. This service must be called once for each interaction class to be ordered, even if these object classes belong to the same class hierarchy. Subsequent businesses can query whether the specified interaction class is ordered through the IsInteractionClassSubscribed service.
[0067] like Fig.11 As shown in the flowchart of cancelling the subscription of interaction classes, during the simulation running phase, the simulation unit calls the cancelling the subscription of interaction classes service to declare to the joint simulation that the simulation unit no longer consumes the data of the specified interaction class. After receiving the request, the simulation service will delete the subscription relationship of the current simulation unit to the interaction class in the data storage. After the subscription of the interaction class is successfully canceled, when a simulation unit in the joint simulation updates the data of the interaction class, the simulation service will no longer forward the interaction class data to the current simulation unit.
[0068] In the above process, the step of determining whether the received request is valid includes: after the simulation service receives the request, it obtains the joint simulation handle, the simulation unit handle and the object class handle through deserialization, and checks whether the joint simulation handle, the simulation unit handle and the object class handle are valid through three interfaces: whether the joint simulation exists, whether the simulation unit exists and whether the object class exists. If invalid, it returns the corresponding error code; if valid, it proceeds to the next step.
[0069] In step 306, after the simulation service performs the operation of adding or deleting the published subscription relationship on the object class subscription relationship set in the associated container according to the request, it also includes: checking whether there are other simulation units in the joint simulation that have registered the object instance of the object class, and if so, obtaining the object instance information, and triggering the discovery of the object instance registration callback function or the deletion of the object instance registration callback function to implement subscription or cancellation.
[0070] In this embodiment, if Figure 8The flowchart of ordering object classes shown in the figure checks whether other simulation units in the joint simulation have registered object instances of the object class. If so, the object instance information is obtained and the object instance registration callback function is triggered. After the object class is successfully ordered, when a simulation unit in the joint simulation updates the object instance data of the object class, the simulation service will forward the object instance data of the object class to the current simulation unit. This service must be called once for each object class to be ordered, even if these object classes belong to the same class hierarchy. Subsequent businesses can query whether the specified object class is ordered through the IsObjectClassSubscribed (Is the object class subscribed) service.
[0071] like Fig. 9 The flowchart of unsubscribing an object class shown in the figure checks whether other simulation units in the joint simulation have registered an object instance of the object class. If so, the object instance information is obtained, and the callback function for deleting the object instance registration is triggered. After the object class is unsubscribed successfully, when a simulation unit in the joint simulation updates the object instance data of the object class, the simulation service will no longer forward the object class data to the current simulation unit.
[0072] In one embodiment, the simulation server sends entity data to a successfully matched receiving end according to a pre-built published subscription relationship, including: the receiving end declares the intention to consume the target object class data to the simulation service by subscribing to the object class service, and when a sender updates the object instance data of the target object class in the joint simulation, the simulation service forwards the object instance data of the target object class to the receiving end; the receiving end declares the intention to consume the target interaction class data to the simulation service by subscribing to the interaction class service, and when a sender updates the interaction data of the target interaction class in the joint simulation, the simulation service forwards the interaction data of the target interaction class to the receiving end.
[0073] In one embodiment, before the simulation server sends the entity data to the successfully matched receiving end according to the pre-built publication subscription relationship, it also includes: obtaining the target object instance data and interaction data according to the entity data, the sending end registers the object instance of the target object class and publishes the target object instance data and interaction data to the simulation server.
[0074] In one embodiment, before the sending end obtains the interest area message of each receiving end for the target entity from the simulation server and stores it in the index table, it includes: the receiving end calls the create interest area interface of the dynamic library, requests the simulation server to create an interest area object, and the simulation server returns the interest area handle bound to the interest area object; the receiving end calls the attach interest area interface of the dynamic library, requests the simulation server to associate the created interest area object with the target entity, obtains the interest area message of the target entity, and the simulation server forwards the interest area message to each sending end.
[0075] In this embodiment, the present invention provides the receiving end with five active call interfaces in the form of C++ dynamic library, namely, creating a region of interest, modifying a region of interest, deleting a region of interest, attaching a region of interest, and separating a region of interest. The user can directly call the interface for use, or indirectly call it through the method configured by the visual interface through the public data model development tool provided by KD-JLink.
[0076] Create an interest region: Request the simulation service to create an interest region object. The interest region object is created on the "heap". When an interest region is no longer needed, it should be deleted using the delete interest region service. After successful creation, the simulation service will return an interest region handle that is bound to the interest region and unique in the joint simulation. It should be noted that the newly created region is invalid before the attach interest region service is used.
[0077] Attaching a region of interest: Associate an already created region of interest with an entity. The simulation service forwards it to all senders in the joint simulation. A receiver subscribes to the entity with a domain and sets the entity's subscription mode to subscription with a domain. It should be noted that a region of interest can only be attached once.
[0078] In one embodiment, before the sending end obtains the region of interest message of each receiving end for the target entity from the simulation server and stores it in the index table, it also includes: when the sending end joins the joint simulation, it asks the simulation server whether any receiving end has attached a region of interest to the target entity, and if so, requests the simulation server to forward the region of interest message of the target entity. In this embodiment, when the receiving end joins the joint simulation before the sending end, the sending end does not know that any receiving end has attached a region of interest, which causes the sending end to miss the received region of interest message, causing a logic error. In view of this situation, when the sending end joins the joint simulation, it will ask the simulation service whether any receiving end has attached a region of interest to this entity, and if so, request the simulation service to forward the attached region of interest message for it, so that the filtering mechanism forms a closed loop.
[0079] In one embodiment, the dynamic library further includes a modification area of interest interface, a deletion area of interest interface, and an addition area of interest interface.
[0080] In this embodiment, modify the region of interest: request the simulation service to modify the created region of interest. If the region of interest has been attached to an entity, the simulation service will notify all senders to update their bound regions of interest to the modified region of interest. The receiving end calls the region of interest modification service at simulation time t, and the sending end starts matching data according to the updated region of interest at time t+1.
[0081] Delete ROI: Request the simulation service to delete a created ROI and release the memory it occupies. If the ROI has been attached to an entity, you need to call the detach ROI service to detach it first, otherwise the error that the ROI is in use will be returned.
[0082] Detach ROI: Detach a ROI from its associated entity. The simulation service forwards it to all senders in the joint simulation. The receiver no longer subscribes to the entity with a domain and sets the subscription mode of the entity to without domain subscription. The separated ROI can be deleted using the Delete ROI service.
[0083] In one embodiment, interest matching of the current index result with the entity data is performed according to a preset index matching method, including: obtaining the currently traversed index result, judging in order of the attributes of the index entity whether the attributes meet the constraint conditions of the interest area; when judging, if the constraint conditions of the current attribute are not within the interest area, the current index result fails to match the entity data; if the constraint conditions of the current attribute are default values, the current attribute is skipped and the judgment of the next attribute is continued.
[0084] In this embodiment, the schematic diagram of the comparison process between the entity data and the constraint conditions of the interest area is as follows: Fig.12 As shown in the figure, the judgment is made from top to bottom according to the order of the entity's attributes. For an area of interest with multiple attributes, it is too time-consuming and wastes the machine's computing resources to judge whether all attributes meet the constraints of the area of interest. Therefore, when judging the attribute constraints, the "short-circuit evaluation operation" method is adopted, that is, when an attribute constraint does not meet the requirements, it is considered that the message is not in this area of interest, and the operation is terminated immediately, and the simulation unit information to which the area of interest belongs is returned. For areas of interest with a large number of attributes, a strategy for attribute default value mismatch is added at the same time. For example, if the user only cares about the entity in the two-dimensional plane and does not make any requirements for the entity height, the height attribute can be set to the default value at this time, and it can be skipped directly during matching. In this way, the amount of calculation during filtering is reduced.
[0085] In a specific embodiment, Fig.13 As shown in the figure, a data filtering process diagram is provided. According to the characteristics of the KD-JLink system, the data transmission process is divided into three stages: the sending end, the simulation service, and the receiving end. The specific data filtering process includes:
[0086] a. The receiver creates an ROI based on its needs and attaches it to the specified entity;
[0087] b. After the sender receives the region of interest message from the receiver, the region of interest information is stored in the index table, and the sender's publishing mode is set to send with domain;
[0088] c. Before sending entity data, the sender calls the data matching interface to determine whether the entity data to be sent is within the region of interest. If not, save the simulation unit handles of all failed matching regions of interest;
[0089] d. The sender packages the entity data and the set of simulation unit handles that failed to match in a specific data format and sends them to the simulation service;
[0090] e. The simulation service distributes the entity data to the successfully matched receiving end according to the information provided by the sending end;
[0091] f. The receiving end that meets the requirements receives the entity data and performs business processing.
[0092] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0093] In one embodiment, Fig.14 As shown, a joint simulation device based on sending end interest matching is provided, including:
[0094] Message storage module 1402, used for the sending end to obtain the interest area messages of each receiving end from the simulation server and store them in the index table; the interest area message includes the interest area of each attribute of the target entity; the index table is used to store the interest area message according to the entity, interest area and attribute constraint conditions;
[0095] The interest matching module 1404 is used for the sending end to call the data matching interface to perform interest matching on the entity data to be sent, including: obtaining the entity data to be sent, searching the corresponding interest area and its attribute constraint conditions in the index table according to the entity handle of the entity data, traversing the index results in turn, and performing interest matching on the current index result and the entity data according to the preset index matching method. If the matching fails, the simulation unit handle to which the interest area in the current index result belongs is saved to the simulation unit handle set;
[0096] The data sending module 1406 is used for the sending end to package the simulation unit handle set and entity data and send them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server has no operation. The simulation server sends the entity data to the successfully matched receiving end according to the pre-built published subscription relationship.
[0097] For the specific limitations of the joint simulation device based on sender interest matching, please refer to the limitations of the joint simulation method based on sender interest matching in the above text, which will not be repeated here. Each module in the above-mentioned joint simulation device based on sender interest matching can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0098] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.15 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a joint simulation method based on sending end interest matching is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0099] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0100] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.
[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0102] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0103] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A joint simulation method based on sender interest matching, the method is implemented in a joint simulation system, the joint simulation system includes a sender, at least one receiving end and a simulation server, characterized in that: The method comprises: The sending end obtains the region of interest messages of each receiving end from the simulation server and stores them in the index table; the region of interest messages include the region of interest of each attribute of the target entity; the index table is used to store the region of interest messages according to the entity, region of interest and attribute constraint conditions; The sending end calls the data matching interface to perform interest matching on the entity data to be sent, including: obtaining the entity data to be sent, searching the corresponding interest area and its attribute constraints in the index table according to the entity handle of the entity data, traversing the index results in turn, and performing interest matching on the current index result and the entity data according to a preset index matching method. If the match fails, the simulation unit handle to which the interest area in the current index result belongs is saved to the simulation unit handle set; The sending end packages the simulation unit handle set and the entity data and sends them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server does not perform any operation. The simulation server sends the entity data to the successfully matched receiving end according to the pre-built publishing subscription relationship. The interest matching between the current index result and the entity data according to the preset index matching method includes: Get the currently traversed index result, and determine whether the attributes meet the constraints of the area of interest in the order of the attributes of the index entity. When judging, if the constraints of the current attributes are not within the area of interest, the current index result fails to match the entity data. If the constraints of the current attributes are the default values, skip the current attribute and continue to judge the next attribute.
2. The method according to claim 1, characterized in that Building a published subscription relationship includes: The simulation service allocates object class handles and interaction class handles to the object class and interaction class respectively; When declaring events of the object class and the interaction class, the simulation unit calls the object class active call interface and the interaction class active call interface of the dynamic library respectively, obtains the corresponding publication subscription relationship, and generates a corresponding request according to the publication subscription relationship; the publication subscription relationship includes the publication relationship or subscription relationship of the current simulation unit to the target object class or interaction class; the publication relationship includes the publication demand and the cancellation demand; the subscription relationship includes the subscription demand and the cancellation demand; The simulation unit obtains the object class handle and the interaction class handle respectively, and initiates corresponding requests to the simulation service through the object class handle and the interaction class handle. The simulation service performs the addition or deletion operation of the published subscription relationship on the corresponding relationship set in the associated container according to the request; the relationship set includes the object class published relationship set, the object class subscription relationship set, the interaction class published relationship set and the interaction class subscription relationship set.
3. The method according to claim 2, characterized in that The simulation server sends the entity data to the successfully matched receiving end according to the pre-built published subscription relationship, including: The receiving end declares its intention to consume the target object class data to the simulation service by subscribing to the object class service. When a sending end updates the object instance data of the target object class in the joint simulation, the simulation service forwards the object instance data of the target object class to the receiving end. The receiving end declares its intention to consume the target interaction class data to the simulation service by subscribing to the interaction class service. When a sender in the joint simulation updates the interaction data of the target interaction class, the simulation service forwards the interaction data of the target interaction class to the receiving end.
4. The method according to claim 3, characterized in that Before the simulation server sends the entity data to the successfully matched receiving end according to the pre-built published subscription relationship, it also includes: The target object instance data and the interaction data are obtained according to the entity data, the sending end registers the object instance of the target object class and publishes the target object instance data and the interaction data to the simulation server.
5. The method according to claim 1, characterized in that Before the sending end obtains the interest area message of each receiving end for the target entity from the simulation server and stores it in the index table, it includes: The receiving end calls the interest region creation interface of the dynamic library, requests the simulation server to create an interest region object, and the simulation server returns an interest region handle bound to the interest region object; The receiving end calls the additional interest region interface of the dynamic library, requests the simulation server to associate the created interest region object with the target entity, obtains the interest region message of the target entity, and the simulation server forwards the interest region message to each sending end.
6. The method according to claim 5, characterized in that Before the sending end obtains the interest area message of each receiving end for the target entity from the simulation server and stores it in the index table, it also includes: When joining the joint simulation, the sender asks the simulation server whether any receiver has attached a region of interest to the target entity. If so, the sender requests the simulation server to forward the region of interest message of the target entity.
7. The method according to claim 5, characterized in that The dynamic library also includes an interface for modifying an area of interest, an interface for deleting an area of interest, and an interface for adding an area of interest.
8. A joint simulation device based on sender interest matching, characterized in that: The device comprises: A message storage module is used for the sending end to obtain the interest area messages of each receiving end from the simulation server and store them in the index table; the interest area message includes the interest area of each attribute of the target entity; the index table is used to store the interest area message according to the entity, interest area and attribute constraint conditions; The interest matching module is used for the sending end to call the data matching interface to perform interest matching on the entity data to be sent, including: obtaining the entity data to be sent, searching the corresponding interest area and its attribute constraint conditions in the index table according to the entity handle of the entity data, traversing the index results in turn, and performing interest matching on the current index result and the entity data according to the preset index matching method. If the match fails, the simulation unit handle to which the interest area in the current index result belongs is saved to the simulation unit handle set; A data sending module, used for the sending end to package the simulation unit handle set and the entity data and send them to the simulation server. For the simulation units in the simulation unit handle set, the simulation server does not perform any operation. The simulation server sends the entity data to the successfully matched receiving end according to the pre-built publishing subscription relationship. The interest matching module is also used to obtain the currently traversed index result, and judge whether the attributes meet the constraints of the interest area in the order of the attributes of the index entity. When judging, if the constraints of the current attributes are not within the interest area, the current index result fails to match the entity data. If the constraints of the current attributes are the default values, the current attribute is skipped and the judgment of the next attribute continues.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.