Communication method, apparatus and electronic device based on entity component system
By using the ECS framework in the entity component system to obtain component data change information and encapsulate communication headers, the problem of low development efficiency in the existing technology is solved, efficient component data communication and functional operation are achieved, and system performance and code reusability are improved.
Patent Information
- Application Number
- CN202410878655.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In existing entity component systems, string or key-value communication methods require secondary developers to read documentation to understand the meaning of the key value, resulting in low development efficiency. Furthermore, the key value and the function implementation lack a direct connection in communication, requiring repeated development of the same communication code.
A communication method based on entity component systems is adopted. The ECS framework is used to obtain component data change information, encapsulate the matching communication header and send it to the receiving end. The receiving end parses the communication header and component data to execute the target function operation, reducing redundant code development.
It achieves unified processing of component data and communication data, improves development efficiency and system performance, simplifies communication protocols, reduces development workload, decouples communication systems and functional systems, and improves code reusability and maintainability.
Smart Images

Figure CN118860342B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communications, and in particular to a communication method, apparatus, and electronic device based on a physical component system. Background Technology
[0002] Cloud rendering allows users to process complex graphics rendering tasks on remote servers and then transmit the rendering results to the user's terminal device over the network, greatly reducing the burden on local hardware and achieving high-quality visual effects and a smooth interactive experience.
[0003] Entity Component System (ECS), as an advanced software architecture pattern, is widely used in game development and complex system simulation. It achieves highly modular and data-driven design by decomposing objects into basic entities, components, and systems, significantly improving development efficiency and runtime performance.
[0004] Traditional plain strings, JSON strings independent of the entity component system, or key-value communication methods have drawbacks. Different functions require different strings or keys, necessitating that each new function must be defined by the developer. Furthermore, the keys in the communication have no direct, apparent connection to the specific functions implemented. In other words, existing technologies require secondary developers to read documentation to understand the meaning of the strings or keys defined by the primary developer, and these secondary developers also need to repeatedly develop the same communication code, resulting in low development efficiency. Summary of the Invention
[0005] In view of the above problems, the present invention provides a communication method, apparatus and electronic device based on a physical component system that overcomes or at least partially solves the above problems.
[0006] Firstly, a communication method based on an entity component system includes:
[0007] Based on user interaction commands, obtain information on changes in component data within the ECS framework;
[0008] The component data of the corresponding component in the target rendering model is changed to the component data change information to obtain new component data. The component data and the component data change information both correspond to the same ECS component and are both stored in the front end.
[0009] The new component data is loaded into a communication body, and a matching communication header is encapsulated for the communication body, wherein the type of the communication header matches the new component data;
[0010] The encapsulated communication body is sent to the receiving end so that the receiving end can parse the communication header and the component data based on the ECS framework.
[0011] Optionally, in some alternative implementations, before obtaining the component data change information in the ECS framework according to user interaction instructions, the method further includes:
[0012] Obtain user interaction commands input by the user in the front-end interactive interface.
[0013] Optionally, in some optional implementations, obtaining component data change information in the ECS framework based on user interaction commands includes:
[0014] Based on the user interaction command, determine the user needs corresponding to the user interaction command;
[0015] Determine the component data change information in the ECS framework corresponding to the user requirements, wherein the user requirements are the user's rendering requirements for the ECS components of the target rendering model, and the component data change information reflects the target changes in the component data of the corresponding ECS components.
[0016] Optionally, in some optional implementations, the step of changing the component data of the corresponding component in the target rendering model to the component data change information to obtain new component data includes:
[0017] Based on the aforementioned requirements, query and determine the component data of the corresponding target rendering model's ECS component;
[0018] The obtained component data is modified to the component data change information to change the component data of the ECS component of the target rendering model, thereby obtaining the new component data of the ECS component of the target rendering model.
[0019] Optionally, in some alternative implementations, loading the new component data into the communication body and encapsulating the communication body with a matching communication header includes:
[0020] The new component data is loaded into the communication body;
[0021] Select and encapsulate a matching communication header based on the new component data, wherein the communication header is a communication header of entity node change type or component information change type.
[0022] Optionally, in some alternative implementations, sending the encapsulated communication body to the receiving end so that the receiving end can parse the communication header and the component data based on the ECS framework includes:
[0023] The encapsulated communication body is sent to the receiving end;
[0024] The receiving end parses the communication header in the communication body and determines the target function operation corresponding to the communication header;
[0025] The receiving end parses the new component data in the communication body to determine the data used by the corresponding ECS component to perform the target function operation.
[0026] Optionally, in some alternative implementations, after the receiving end parses the new component data in the communication body and determines the data used for the corresponding ECS component to perform the target function operation, the method further includes:
[0027] The receiving end executes the target function operation through the corresponding ECS component based on the new component data, so as to perform rendering corresponding to the target function operation.
[0028] Optionally, in some alternative implementations, after the receiving end completes the target function operation through the corresponding ECS component based on the new component data to perform rendering corresponding to the target function operation, the method further includes:
[0029] After performing the target function operation, the receiving end updates the component data of the corresponding ECS component stored in the background;
[0030] The receiving end returns the rendering result of the target function operation to the sending end of the communication body.
[0031] In a second aspect, a communication device based on a physical component system includes: a change information acquisition unit, a component information modification unit, a communication body construction unit, and a communication body transmission unit;
[0032] The change information acquisition unit is used to obtain component data change information in the ECS framework according to user interaction instructions;
[0033] The component information change unit is used to change the component data of the corresponding component in the target rendering model to the component data change information to obtain new component data. The component data and the component data change information both correspond to the same ECS component and are both stored in the front end.
[0034] The communication body construction unit is used to load the new component data into the communication body and encapsulate a matching communication header for the communication body, wherein the type of the communication header matches the new component data;
[0035] The communication body sending unit is used to send the encapsulated communication body to the receiving end, so that the receiving end can parse the communication header and the component data based on the ECS framework.
[0036] Thirdly, a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the communication method of any of the preceding entity component-based systems.
[0037] Fourthly, an electronic device includes at least one processor, at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is configured to invoke program instructions in the memory to execute the communication method based on the physical component system described above.
[0038] By employing the above technical solution, the present invention provides a communication method, apparatus, and electronic device based on an entity component system. This method can obtain component data change information within an ECS framework based on user interaction commands; change the component data of the corresponding component in the target rendering model to the component data change information to obtain new component data, wherein both the component data and the component data change information correspond to the same ECS component and are stored on the front end; load the new component data into a communication body and encapsulate the communication body with a matching communication header, wherein the type of the communication header matches the new component data; and send the encapsulated communication body to the receiving end, so that the receiving end can parse the communication header and the component data based on the ECS framework. Therefore, the present invention only modifies the component data and encapsulates the corresponding communication header during communication, eliminating the need for repetitive development of a large amount of code. Furthermore, only secondary developers need to understand the communication header, without needing to read the developer-defined documentation, making it convenient and highly efficient.
[0039] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0040] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0041] Figure 1 A flowchart of a communication method based on a physical component system provided by the present invention is shown;
[0042] Figure 2 A schematic diagram of the structure of a communication device based on a physical component system provided by the present invention is shown;
[0043] Figure 3 A schematic diagram of the structure of an electronic device provided by the present invention is shown. Detailed Implementation
[0044] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0045] like Figure 1 As shown, the present invention provides a communication method based on a physical component system, including: S100, S200, S300 and S400;
[0046] S100. Obtain component data change information in the ECS framework based on user interaction commands;
[0047] Optionally, this invention can be applied to the communication portion of cross-platform 3D visualization and real-time rendering systems. Existing communication methods use strings, key-value formats, or traditional API communication, which are highly customized and require significant development and maintenance effort. Therefore, this invention improves the communication portion of cross-platform 3D visualization and real-time rendering systems. It incorporates the ECS architecture concept into the communication data, achieving unified processing of communication data and local data, thus improving development efficiency and system performance. Furthermore, due to the innovative communication data format based on the ECS concept, the data format for all functions will be unified. Compared to existing key-value communication data and strings, this simplifies the communication protocol and improves data processing consistency and efficiency.
[0048] In other words, during local function development, all user requirements are converted into changes in component data of the ECS system. Specifically, this invention is generally transformed into three types of entity node changes (adding nodes, deleting nodes, and node data changes) and three types of component information changes (adding components to nodes, deleting components from nodes, and node component changes). The uniformity lies in the fact that the data carried by the communication body is consistent with the ECS data changes generated by the aforementioned local functions. That is, from the perspective of the functional subsystem, there is no need to distinguish between communication commands and local commands.
[0049] Optionally, the front end of the present invention can obtain user interaction instructions, and then obtain corresponding component data change information based on the user interaction instructions.
[0050] That is, in some optional embodiments, before S100, the method further includes: step 1.1;
[0051] Step 1.1: Obtain user interaction commands input by the user in the front-end interactive interface.
[0052] Optionally, in some alternative implementations, step S100 includes: steps 2.1 and 2.2;
[0053] Step 2.1: Determine the user needs corresponding to the user interaction instructions based on the user interaction instructions;
[0054] Step 2.2: Determine the component data change information in the ECS framework corresponding to the user requirements, wherein the user requirements are the user's rendering requirements for the ECS components of the target rendering model, and the component data change information reflects the change target of the component data of the corresponding ECS components.
[0055] Optionally, the present invention may design and implement a user interface on the front end, including but not limited to a view display area, user input controls, and necessary feedback prompts.
[0056] For example, this invention utilizes the model focusing function in three interactive scenarios: double-clicking the corresponding model in the model organization tree, clicking the focus button in the model properties, and double-clicking the corresponding model in the 3D view. These three front-end operations all generate a user demand for "model focusing," meaning the corresponding component data change information can be "needs focusing." This invention does not impose any restrictions on this.
[0057] S200: Change the component data of the corresponding component in the target rendering model to the component data change information to obtain new component data;
[0058] The component data and the component data change information both correspond to the same ECS component and are both stored in the front end;
[0059] Optionally, in some alternative implementations, step S200 includes: steps 3.1 and 3.2;
[0060] Step 3.1: Based on the aforementioned requirement information, query and determine the component data of the corresponding target rendering model's ECS component;
[0061] Step 3.2: Modify the obtained component data to the component data change information to change the component data of the ECS component of the target rendering model, and obtain the new component data of the ECS component of the target rendering model.
[0062] Optionally, as mentioned above, after the front end generates a user request for "model focusing", the present invention can query the corresponding model information (including component data) in the front end data, and then modify the component data of the model focusing component in the model information to "needs focusing". The present invention does not limit this.
[0063] Specifically, this invention can query the model focusing component carried by the model entity node in the front-end tree data structure based on the model UUID corresponding to the "model focusing" requirement. This invention does not impose any restrictions on this.
[0064] Optional, Model: This is a three-dimensional model, composed of vertices and faces in computer graphics, and usually also includes materials and responses to light, etc. The model is rendered and presented on the user's screen.
[0065] Model UUID: This is a unique code for each model in the system. It remains unchanged after a system restart, and the UUID will also change when the model is modified.
[0066] Model Entity Nodes: The model tree is a method for organizing models in this system. A model tree consists of nodes. Nodes are divided into conceptual nodes and entity nodes. An entity node that includes model components is called a model entity node. For example, in a community scenario organized according to tree logic, the public area is a node, and under the public area are nodes such as landscaping, lighting, and fire protection; these nodes are all conceptual nodes. However, a fire hydrant numbered xx under the fire protection node, along with its model component, is a model entity node.
[0067] Model-focused component: The model-focused component is a type of component. Other common components include transformation components, etc.
[0068] Optionally, this invention can maintain a tree-like data structure for the entity component system on the front end (i.e., the aforementioned front-end data). The tree-like data structure includes the tree relationship of entities and the component types and component data carried by each entity. When communication is required on the front end, this invention can use a new communication format optimized based on the ECS concept—adding a communication header before part of the tree-like data structure. Please refer to the subsequent process for details.
[0069] S300: Load the new component data into the communication body and encapsulate the communication body with a matching communication header;
[0070] The type of the communication header matches the new component data;
[0071] Optionally, in some alternative implementations, S300 includes: steps 4.1 and 4.2;
[0072] Step 4.1: Load the new component data into the communication body;
[0073] Step 4.2: Select and encapsulate a matching communication header based on the new component data, wherein the communication header is a communication header of entity node change type or component information change type.
[0074] Optionally, the present invention can load new component data into a communication body and then send it to the receiving end along with a suitable communication header. Taking the user requirement of "model focusing" mentioned above as an example, "need to focus" is loaded into the communication body and then sent to the receiving end along with a communication header of type node component change.
[0075] It should be noted that this invention does not impose specific restrictions on the type of communication header, which can be set according to actual needs. For example, it can generally be divided into entity node change type, component information change type, communication establishment type, survival confirmation type, active / passive disconnection type, and initialization communication type communication headers. Entity node change type can be further subdivided into adding nodes, deleting nodes, and node data changes. Component information change type can be further subdivided into adding components to nodes, deleting components from nodes, and changing node components. Initialization communication type can be further subdivided into scene (model tree) creation and scene (model tree) removal; this invention does not impose restrictions on these.
[0076] S400. The encapsulated communication body is sent to the receiving end so that the receiving end can parse the communication header and the component data based on the ECS framework.
[0077] Optionally, in some alternative implementations, S400 includes: steps 5.1, 5.2, and 5.3;
[0078] Step 5.1: Send the encapsulated communication device to the receiving end;
[0079] Step 5.2: The receiving end parses the communication header in the communication body and determines the target function operation corresponding to the communication header;
[0080] Step 5.3: The receiving end parses the new component data in the communication body to determine the data used by the corresponding ECS component to perform the target function operation.
[0081] Optionally, after receiving the communication body, the backend (i.e., the receiving end) can select the appropriate parsing method based on the communication header. For example, as in the example above, for a communication body with node component change (ComponentChanged) + need for focus (UEModel), the parsing result is component change of the UEModel functional subsystem. This invention does not limit this.
[0082] Specifically, this invention can parse the communication type based on the `type` in the communication header. Based on the `type` in the data of the corresponding communication type, the specific functional operation can be determined. For example, in the above example, `type:"ComponentChanged"` indicates a component data change, and `type:"UEModel"` indicates a task of the UEModel functional system. The UEModel functional system implements the model focusing function based on `focus = true`.
[0083] Optionally, after parsing the communication header, the backend can forward the data to the shared ECS data center for further processing according to the instructions in the communication header. This invention does not limit this.
[0084] Optionally, in some alternative implementations, after step 5.3, the method further includes: step 6.1;
[0085] Step 6.1: The receiving end executes the target function operation through the corresponding ECS component based on the new component data to perform rendering corresponding to the target function operation.
[0086] Optionally, after the ECS component performs the target function operation, it generates component data of the ECS component after the target function operation is completed, and then performs the corresponding rendering task. This invention does not limit this.
[0087] Optionally, in some alternative implementations, after step 6.1, the method further includes steps 7.1 and 7.2;
[0088] Step 7.1: After performing the target function operation, the receiving end updates the component data of the corresponding ECS component stored in the background;
[0089] Step 7.2: The receiving end returns the rendering result of the target function operation to the sending end of the communication body.
[0090] Optionally, after the target function operation of the present invention is completed, the receiving end can update the component data of the ECS component and return the rendering result to the front end through the same communication channel as when it arrived. The front end receives the data and rendering result and displays them, completing one interactive loop.
[0091] Optionally, after the relevant functional subsystem completes the rendering task, there may be subsequent actions. For example, in this case, after the model focusing is completed, the focus value will be set to false again. This invention does not limit this.
[0092] In summary, the general process of this invention is as follows: the user generates an intent, the front end generates data (e.g., data A), sends it to the back end, the back end parses and forwards it to the functional module, the focusing functional module parses and executes focusing, generates component data of the completed ECS component (corresponding to data A), generates and executes the rendering task, the component data result (corresponding to data A) is returned to the front end, and the rendering result is returned to the front end. The user performs operations and ultimately obtains the rendering result. The ECS data is in the back end and is generally not visible to the user.
[0093] Optionally, this invention borrows the idea of unified component data used in the ECS system and innovatively improves the ECS system, enabling its component data to be used for communication, thus achieving corresponding beneficial effects:
[0094] Compared to traditional string or key-value communication formats that require defining one or more new keys for each function, this invention uses a unified communication format for all functional data, significantly reducing development effort. Because both the system and communication are based on the ECS architecture, data can be interoperated through simple transformations. This allows communication data and local commands to be executed by the same unit, decoupling the communication system from the functional system and improving code reusability and maintainability. By fully utilizing the rich development tools of the front-end user interface and the powerful rendering capabilities of the back-end or cloud, each performs its specific function, resulting in a clearer and more aesthetically pleasing user interface in most situations compared to the back-end.
[0095] like Figure 2 As shown, the present invention provides a communication device based on a physical component system, comprising: a change information acquisition unit 100, a component information modification unit 200, a communication body construction unit 300, and a communication body transmission unit 400;
[0096] The change information acquisition unit 100 is used to obtain component data change information in the ECS framework according to user interaction instructions.
[0097] The component information modification unit 200 is used to modify the component data of the corresponding component in the target rendering model to the component data change information to obtain new component data. The component data and the component data change information both correspond to the same ECS component and are both stored in the front end.
[0098] The communication body construction unit 300 is used to load the new component data into the communication body and encapsulate a matching communication header for the communication body, wherein the type of the communication header matches the new component data;
[0099] The communication body sending unit 400 is used to send the encapsulated communication body to the receiving end, so that the receiving end can parse the communication header and the component data based on the ECS framework.
[0100] Optionally, in some alternative embodiments, the apparatus further includes: an instruction acquisition unit;
[0101] The instruction acquisition unit is used to acquire user interaction instructions input by the user on the front-end interactive interface before acquiring component data change information in the ECS framework based on user interaction instructions.
[0102] Optionally, in some optional embodiments, the change information obtaining unit 100 includes: a demand determination subunit and a change information determination subunit;
[0103] The requirement determination subunit is used to determine the user requirement corresponding to the user interaction instruction based on the user interaction instruction.
[0104] The change information determination subunit is used to determine the component data change information in the ECS framework corresponding to the user requirement, wherein the user requirement is the user's rendering requirement for the ECS component of the target rendering model, and the component data change information reflects the change target of the component data of the corresponding ECS component.
[0105] Optionally, in some optional implementations, the component information modification unit 200 includes: a component data query subunit and a component information modification subunit;
[0106] The component data query subunit is used to query the component data of the corresponding target rendering model's ECS component based on the requirement information.
[0107] The component information change subunit is used to modify the queried component data into the component data change information, so as to change the component data of the ECS component of the target rendering model and obtain the new component data of the ECS component of the target rendering model.
[0108] Optionally, in some alternative embodiments, the communication body construction unit 300 includes: a data loading subunit and a data encapsulation subunit;
[0109] The data loading subunit is used to load the new component data into the communication body;
[0110] The data encapsulation subunit is used to select and encapsulate a matching communication header based on the new component data, wherein the communication header is a communication header of entity node change type or component information change type.
[0111] Optionally, in some alternative embodiments, the communication body sending unit 400 includes: an information sending subunit, a communication header parsing subunit, and a data parsing subunit;
[0112] The information sending subunit is used to send the encapsulated communication body to the receiving end;
[0113] The communication header parsing subunit is used by the receiving end to parse the communication header in the communication body and determine the target function operation corresponding to the communication header.
[0114] The data parsing subunit is used by the receiving end to parse new component data in the communication body and determine the data used by the corresponding ECS component to perform the target function operation.
[0115] Optionally, in some alternative embodiments, the apparatus further includes: a rendering unit;
[0116] The rendering unit is configured to parse new component data in the communication body at the receiving end, determine the data used by the corresponding ECS component to perform the target function operation, and then execute the target function operation through the corresponding ECS component according to the new component data to perform rendering corresponding to the target function operation.
[0117] Optionally, in some alternative embodiments, the apparatus further includes: a data update unit and a result return unit;
[0118] The data update unit is used to update the component data of the corresponding ECS component stored in the background after the receiving end completes the target function operation through the corresponding ECS component according to the new component data to perform the rendering corresponding to the target function operation.
[0119] The result return unit is used to return the rendering result of the target function operation to the sending end of the communication body.
[0120] The present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the communication method of any of the above-described entity component-based systems.
[0121] like Figure 3 As shown, the present invention provides an electronic device 70, which includes at least one processor 701, at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call program instructions in the memory 702 to execute the communication method based on the physical component system described above.
[0122] In this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0123] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0124] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this invention may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0125] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A communication method based on a physical component system, characterized by, The method comprises the following steps: obtaining component data change information in an ECS framework according to a user interaction instruction; changing component data of a corresponding component in a target rendering model to the component data change information to obtain new component data, wherein the component data and the component data change information both correspond to the same ECS component and are stored in a front end; loading the new component data into a communication body; selecting and packaging a matching communication header according to the new component data, wherein the communication header is a communication header of an entity node change type or a component information change type; the type of the communication header matches the new component data; sending the packaged communication body to a receiving end; the receiving end analyzes the communication header in the communication body to determine a target function operation corresponding to the communication header; the receiving end analyzes the new component data in the communication body to determine data used by a corresponding ECS component to execute the target function operation.
2. The method of claim 1, wherein, Before the step of obtaining component data change information in an ECS framework according to a user interaction instruction, the method further comprises: obtaining a user interaction instruction input by a user in a front end interaction interface.
3. The method of claim 2, wherein, The step of obtaining component data change information in an ECS framework according to a user interaction instruction comprises: determining a user demand corresponding to the user interaction instruction according to the user interaction instruction; determining component data change information in an ECS framework corresponding to the user demand, wherein the user demand is a rendering demand of a user for an ECS component of a target rendering model, and the component data change information reflects a change target of component data of the corresponding ECS component.
4. The method of claim 3, wherein, The step of changing component data of a corresponding component in a target rendering model to the component data change information to obtain new component data comprises: querying component data of an ECS component of a corresponding target rendering model according to demand information; modifying the queried component data to the component data change information to change the component data of the ECS component of the target rendering model to obtain new component data of the ECS component of the target rendering model.
5. The method of claim 1, wherein, After the step of analyzing the new component data in the communication body by the receiving end to determine data used by a corresponding ECS component to execute the target function operation, the method further comprises: performing rendering corresponding to the target function operation by the receiving end through the corresponding ECS component according to the new component data.
6. The method of claim 5, wherein, After the step of performing the target function operation by the receiving end through the corresponding ECS component according to the new component data to perform rendering corresponding to the target function operation, the method further comprises: updating component data of the corresponding ECS component stored in a background by the receiving end after performing the target function operation; returning a rendering result of the target function operation to a sending end of the communication body by the receiving end.
7. A communication apparatus based on a physical component system, characterized by The method comprises the following steps: a change information obtaining unit, a component information changing unit, a communication body constructing unit and a communication body sending unit; the change information obtaining unit is configured to obtain component data change information in an ECS framework according to a user interaction instruction; The component information changing unit is configured to change component data of a corresponding component in a target rendering model into the component data change information, to obtain new component data, wherein the component data and the component data change information both correspond to a same ECS component and are both stored in the front end; The communication body construction unit is configured to load the new component data into a communication body, select and encapsulate a matching communication head according to the new component data, wherein the communication head is a communication head of an entity node change type or a component information change type, and the type of the communication head matches the new component data; The communication body sending unit is configured to send the encapsulated communication body to a receiving end, the receiving end analyzes the communication head in the communication body, determines a target function operation corresponding to the communication head, and analyzes the new component data in the communication body to determine data used by a corresponding ECS component to execute the target function operation.
8. An electronic device, comprising: The electronic device comprises at least one processor, at least one memory connected with the processor, and a bus; wherein the processor, the memory complete mutual communication through the bus; the processor is used to call the program instruction in the memory, to execute the communication method based on the entity component system as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Web front end message bus system
CN107291523A
Component display method and device based on data large screen, equipment and medium
CN118131949A