Computer system simulation method, system, platform, and apparatus
By generating traffic simulation nodes with the same or similar traffic transmission and reception behaviors, the problems of waste of resources and low simulation efficiency in the prior art are solved, and efficient computer system simulation is realized, reducing costs and improving simulation efficiency.
Patent Information
- Application Number
- PCT/CN2024/084285
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-29
- Filing Date
- 2024-03-28
- Publication Date
- 2024-12-05
AI Technical Summary
Existing computer system simulation methods require complete replication of real working nodes, resulting in waste of resources and low simulation efficiency, especially in large-scale testing and integrated verification, with high cost and long cycles.
Using the method of traffic simulation nodes, by obtaining traffic transmission and reception information and behavioral rules of real work nodes, we generate simulation nodes with the same or similar traffic transmission and reception behaviors, reduce the use of resources, and store and deploy traffic through low-code or zero-code forms. Behavioral rules to achieve large-scale simulation.
It greatly reduces the simulation cost of computer systems, increases the maximum simulation scale, saves resources, improves simulation efficiency, and simplifies the generation and deployment of simulation nodes.
Smart Images

Figure CN2024084285_05122024_PF_FP_ABST
Abstract
Description
A computer system simulation method, system, platform and device
[0001] This application claims priority to Chinese patent application No. 2023106181974, filed on May 29, 2023, entitled “A method, system, platform and device for simulating a computer system”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of simulation technology, and in particular to a simulation method, system, platform and device for a computer system. Background Art
[0003] With the rise of microservices architecture, computer systems are becoming increasingly large. Integration verification and large-scale testing require significant resources and costs, resulting in delayed problem discovery, high costs, and long test cycles. Computer system simulation is used to simulate the external behavior of services for baseline testing and architecture verification, reducing the resources and costs of integration verification and large-scale testing, and supporting the shift-left approach to testing.
[0004] In traditional computer simulation methods, to create a simulation work node, you need to completely copy a corresponding real work node. Not only the code related to its traffic receiving and sending behavior is copied, but also a large amount of business code is copied. However, in actual simulation needs, the simulation node may not be required to perform precise business processing, resulting in a waste of resources and reducing simulation efficiency.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a computer system simulation method, system, platform, and device. A simulation method, system, platform, and device using traffic simulation nodes can be provided, significantly reducing the simulation cost of the computer system and increasing the maximum simulation scale of the computer system.
[0007] In a first aspect, a method for generating a simulation node is provided, wherein the method comprises:
[0008] Obtain the traffic sending and receiving information of the real working node;
[0009] Acquire a traffic behavior rule of the real working node according to the traffic sending and receiving information of the real working node, wherein the traffic behavior rule of the real working node is used to instruct the real working node to perform traffic sending and receiving behavior;
[0010] A traffic simulation node is generated according to the traffic behavior rule of the real working node, and the traffic simulation node occupies fewer resources than the real working node.
[0011] The method provided in the embodiment of the present application can generate a traffic simulation node with the same or similar traffic reception and transmission behavior as the real working node by monitoring the external traffic reception and transmission information of the real working node. The traffic simulation node only focuses on traffic reception and transmission, and pays little or no attention to the internal business processing behavior of the real working node. Compared with the real working node, the traffic simulation node can significantly reduce the resources occupied, which greatly saves resources in large-scale simulation experiments.
[0012] In one possible implementation, the traffic behavior rules of the real working node are stored in the traffic simulation node in a low-code or zero-code form.
[0013] In this implementation, storing traffic behavior rules in a low-code or zero-code manner can facilitate large-scale batch production and deployment of traffic simulation nodes, improving the universality of traffic simulation node generation.
[0014] In a possible implementation, obtaining the traffic behavior rule of the real working node further includes:
[0015] Obtain the status information corresponding to the traffic behavior rules of the real working node;
[0016] The generating traffic simulation node further includes:
[0017] The state information corresponding to the traffic behavior rule of the real working node is stored in the traffic simulation node.
[0018] In this implementation method, if a real working node has multiple different operating states, the traffic simulation node that stores state information can also simulate the real working node to adjust different business states in different situations, thereby applying different traffic behavior rules, and thus displaying different traffic sending and receiving states to the outside world, thereby better simulating the real working node and improving simulation efficiency.
[0019] In one possible implementation, the traffic behavior rules include one or more of the following:
[0020] Passive response rules, proxy forwarding rules, active request rules, event definition rules, and state cache rules.
[0021] In this implementation, through detailed traffic behavior rules such as passive response rules and proxy forwarding rules, the vast majority of real simulation nodes can be simulated more comprehensively and universally.
[0022] In a possible implementation, the traffic receiving and sending information of the real working node is obtained through traffic probe technology.
[0023] In this implementation, the traffic probe technology can effectively obtain relevant traffic transmission and reception information of the real working node, such as the API interface for traffic transmission and reception, information in the stack, API call frequency, etc.
[0024] In a possible implementation, the method further includes:
[0025] Comparing the traffic receiving and sending information of the traffic simulation node and the real working node;
[0026] Obtaining a difference in traffic receiving and sending information between the real working node and the traffic simulation node;
[0027] According to the difference in the traffic sending and receiving information, the traffic behavior rules of the traffic simulation node are adjusted.
[0028] In this embodiment, after the traffic simulation node is generated, the traffic simulation node can be further adjusted according to the difference in traffic sending and receiving behaviors between the two, so that the traffic simulation node can continue to evolve and more realistically simulate a real working node.
[0029] In a possible implementation, before comparing the traffic transmission and reception information of the traffic simulation node and the real working node, the method further includes:
[0030] The same traffic information is sent to the traffic simulation node and the real working node.
[0031] In this embodiment, before comparing the real working node and the traffic simulation node, the same traffic is given to them to observe the difference in traffic behavior under the same input traffic. This can eliminate the interference caused by different traffic and improve the realism of the simulation.
[0032] In a possible implementation, before comparing the traffic transmission and reception information of the traffic simulation node and the real working node, the method further includes:
[0033] Traffic information is input into the real computer system and the simulated computer system. The simulated computer system where the traffic simulation node is located also includes other working nodes, and the real computer system where the real working node is located also includes other working nodes.
[0034] In this implementation, the real working node and the traffic simulation node can be placed in their corresponding working systems respectively. By inputting the same traffic into the two systems to simulate the working conditions in the real production environment, the differences in the traffic receiving and sending behaviors of the two in the real working conditions can be detected to improve the simulation efficiency.
[0035] In a second aspect, the present invention provides a device for generating a traffic simulation node, which is implemented by the device of the first aspect and will not be described in detail here.
[0036] In a third aspect, the present invention provides a computer system, wherein at least one working node in the computer system is a traffic simulation node, and the traffic simulation node corresponds to at least one real working node;
[0037] The traffic simulation node includes at least one traffic behavior rule module and at least one execution engine module, wherein the traffic behavior rule module is used to store the traffic behavior rules of the traffic simulation node, and the traffic behavior rules are rules for the working nodes corresponding to the traffic behavior rules to execute traffic receiving and sending behaviors;
[0038] The traffic simulation node occupies less resources than the real working node;
[0039] The execution engine module is used to drive the execution of the traffic behavior rules of the traffic simulation node.
[0040] In this implementation, traffic simulation nodes can be deployed in a production environment to achieve large-scale simulation while using fewer resources, thus saving resource consumption.
[0041] In one possible implementation, the traffic behavior rule module stores the traffic behavior rules in a low-code or zero-code format.
[0042] In this implementation, storing traffic behavior rules in a low-code or zero-code manner can facilitate large-scale batch production and deployment of traffic simulation nodes, improving the universality of traffic simulation node generation.
[0043] In a possible implementation, the traffic simulation node is further configured with at least one state cache module, and the state cache module is used to cache state information of the traffic simulation node, and different state information corresponds to different traffic behavior rules.
[0044] In this implementation method, if a real working node has multiple different operating states, the traffic simulation node that stores state information can also simulate the real working node to adjust different business states in different situations, thereby applying different traffic behavior rules, and thus displaying different traffic sending and receiving states to the outside world, thereby better simulating the real working node and improving simulation efficiency.
[0045] In one possible implementation, the traffic behavior rules include one or more of the following:
[0046] Passive response rules, proxy forwarding rules, active request rules, event definition rules, and state cache rules.
[0047] In this implementation, through the detailed traffic behavior rules such as passive response rules and proxy forwarding rules, it is possible to more comprehensively and universally imitate the vast majority of real simulation nodes.
[0048] In a possible implementation, the computer system further includes at least one event simulation module, which is used to simulate at least one traffic change event, including: traffic burst, traffic surge, traffic fluctuation, and traffic drop.
[0049] In this implementation, various types of traffic change events encountered in a real computer system can be simulated more comprehensively, and the traffic processing process of the real system can be simulated more comprehensively.
[0050] In a fourth aspect, the present invention provides a computer device cluster, each computing device comprising a processor and a memory;
[0051] The processor of the at least one computing device is configured to execute instructions stored in a memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 8.
[0052] In a fifth aspect, the present invention provides a computer program product comprising instructions, wherein when the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 8.
[0053] In a sixth aspect, the present invention provides a computer-readable storage medium comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 8. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] FIG1 is a schematic diagram of a method for generating a traffic simulation node according to an embodiment of the present application;
[0055] FIG2 is a schematic diagram of a type of traffic behavior rule provided in an embodiment of the present application;
[0056] FIG3 is a schematic diagram of a structure of traffic transmission of a microservice system provided in an embodiment of the present application;
[0057] FIG4 is a schematic diagram of the structure of a traffic simulation node provided in an embodiment of the present application;
[0058] FIG5 is a schematic diagram of another method for generating a traffic simulation node provided in an embodiment of the present application;
[0059] FIG6 is a schematic diagram of a simulation measurement method provided in an embodiment of the present application;
[0060] FIG7 is a schematic diagram of the structure of a simulation generation system provided in an embodiment of the present application;
[0061] FIG8 is a schematic diagram of a simulation system deployment method provided in an embodiment of the present application;
[0062] FIG9 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0063] FIG10 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0064] FIG11 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application; DETAILED DESCRIPTION
[0065] The following will describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0066] In the description of this specification, "one embodiment" or "some embodiments" means that one or more embodiments of this specification include a particular feature, structure, or characteristic described in conjunction with the embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.
[0067] In this specification, unless otherwise specified, " / " represents "or." For example, A / B can represent A or B. "And / or" in this specification is merely a description of an association between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, in the description of the embodiments of this specification, "plurality" refers to two or more than two.
[0068] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. The terms "including," "comprising," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.
[0069] Microservices: A software development technique and a variation of the service-oriented architecture (SOA) style, microservices advocates for breaking a single application into a set of small services that coordinate and collaborate to deliver ultimate value to users. Each service runs in its own independent process, communicating with each other using lightweight communication mechanisms. Each service is built around a specific business need and can be independently deployed in production or production-like environments.
[0070] Simulation node: refers to the basic working unit in the simulation system, which is used to imitate the various working nodes in the real system. Under normal circumstances, each separately deployed service in microservices can be regarded as a working node.
[0071] Computer system simulation involves analyzing the properties of various system elements and their interrelationships, building a simulation model that describes the system's structure or behavior, and incorporates logical or quantitative relationships. This model then conducts experiments or quantitative analysis to obtain the information needed for informed decision-making. Traditional computer system simulation models retain all or most of the original system's code and environment, resulting in a number of drawbacks when simulating large-scale computer systems, such as high resource consumption and limited simulation scale.
[0072] Traffic simulation nodes: These nodes can still simulate the traffic transmission and reception functions of real nodes by removing all or most of the code that is irrelevant or weakly related to traffic transmission and reception. Traffic simulation nodes can significantly reduce the amount of internal code in the simulation node by removing business code that is irrelevant or weakly related to the traffic transmission and reception tasks, thereby significantly reducing its resource usage.
[0073] Subcalls: Subcalls are a series of subsequent traffic information sending and receiving actions triggered by a worker node after receiving a traffic information message. For example, the login module 302 sending a second traffic information message to the database 303 and receiving a third traffic information message back from the database can both be considered subcalls of the received first traffic information message.
[0074] Low code: Encapsulate a series of code functions so that the corresponding multiple encapsulated code functions can be called through only one or several simple codes. The one or several simple codes can be called low code.
[0075] Zero code: encapsulates a series of code functions so that the corresponding multiple encapsulated code functions can be called only through some non-code instructions (such as text, etc.). The non-code instructions can be called zero code.
[0076] In existing microservice system simulations, it is often necessary to create a large number of simulation nodes to simulate the working nodes in the real microservice system, so as to further simulate the overall working status of the microservice system. How to simulate the working nodes in the real microservice system on a large scale and in batches has become a core issue in microservice system simulation.
[0077] One existing technical solution involves deploying a single virtual machine. This solution allows the complete deployment of the business code in a real working node within a virtual machine to form a simulation node. Simulation nodes in multiple virtual machines can then be connected and deployed as a complete simulation system, mimicking the operating state of a real system as closely as possible.
[0078] This technical solution has the following disadvantages: High resource consumption. Because the complete business code is deployed in the virtual machine, each simulated node consumes the same resources as a node in the real system, including computing resources, network resources, and storage resources. This is equivalent to deploying a second real system, consuming a significant amount of computing resources. When a large number of simulated nodes need to be deployed, the required computing resources are prohibitively expensive.
[0079] The present invention proposes a technical solution, which uses traffic simulation nodes to replace simulation nodes in a traditional simulation system, thereby reducing resource consumption of the simulation nodes, thereby achieving the purpose of saving a lot of resources and improving simulation efficiency.
[0080] Compared with the general simulation method of performing business transformation to reduce resource usage, the traffic simulation node has the advantages of simple application, strong versatility and large-scale replication, which greatly enhances the commercial value of simulation technology.
[0081] The following describes a method for generating a traffic simulation node with reference to FIG1 .
[0082] S101, obtaining the traffic receiving and sending information of the real working node.
[0083] The traffic behavior sending and receiving information can be obtained through traffic probe technology or by reading traffic logs.
[0084] S102: Acquire traffic behavior rules of the real working node according to traffic receiving and sending information of the real working node.
[0085] The following describes the content of the traffic behavior rules based on Figure 2.
[0086] The traffic behavior rules may include:
[0087] Passive response rules 202 may be the traffic response behavior a working node performs when receiving certain traffic. Traffic response behavior is the outward manifestation of traffic transmission and reception after receiving external traffic. Traffic response behavior does not focus on the specific processing of received traffic within the working node, but only on the traffic transmission and reception behavior displayed externally after the processing results.
[0088] The following example is explained based on Figure 3. When the login module 302 receives the password of the user 301, the password information sent by the user 301 to the login module 302 can be regarded as the first traffic information. After receiving this information, the login module 302 sends a query request to the database 303. The request can carry the password sent by the user 301. This query request can be regarded as the second traffic information sent by the login module 302. After the database 303 completes the query action based on the received second traffic information, it returns the query result to the login module 302. This query result can be regarded as the third traffic information. After receiving the third traffic information, the login module 302 returns the fourth traffic information of the incorrect password to the user 301, or sends the fifth traffic information of the information call to the business module 304, depending on the specific content of the information. The above login module 302's receiving and issuing behaviors of the first flow information, the second flow information, the third flow information, the fourth flow information, and the fifth flow information can be summarized as the passive response rules of the login module 302. The rules are: receive the first flow information (external flow) sent by the user 301; after receiving the first flow information sent by the user 301, send the second flow information to the database 303; after sending the second flow information to the database 303, receive the third flow information from the database 303; after receiving the third flow information from the database 303, send the fourth flow information to the user 301 or send the fifth flow information to the business module 304. Among them, after receiving the third flow information from the database 303, how to choose whether to send the fourth flow information or the fifth flow information can be determined according to the selection ratio of the login module in the real system. For example, if the login module in the real system receives the third information, there is a 30% probability of returning the password error information to the user, that is, the fourth flow information, and a 70% probability of sending the call information, that is, the fifth flow information, to the business module. This probability can be recorded in the passive response rule of the login module 302, so that the traffic simulation node generated according to this passive response rule can more fully imitate the traffic response behavior of the login module 302.
[0089] In one possible implementation, after receiving the third flow information, the login module 302 can selectively send the fourth or fifth flow information in a variety of ways, and extracting the probability of the third flow information as a flow behavior rule for the login module 302 is only one possible implementation. For example, the selection of the fourth or fifth flow information can also be implemented by the flow behavior rules of the database 303. After receiving the second flow information, the database 303 can select the content of the third flow information to return to the login module 302 based on the probability of the real database verification result. The content can represent a correct password or an incorrect password. After receiving the third flow information representing a correct password or an incorrect password, the login module 302 can select to send the fourth or fifth flow information according to the set rules. For example, after receiving the flow information indicating a correct password (for example, when the third flow information is 0), the fifth flow information is sent, and after receiving the flow information indicating an incorrect password (for example, when the third flow information is 1), the fourth flow information is sent.
[0090] In one possible implementation, the selective transmission of the fourth or fifth traffic flow can also be achieved by adding a separate probability module. Specifically, a separate probability module can be deployed in the simulation system or within each simulation node. When such a selection behavior occurs, the probability module can help the simulation node select one of the traffic behaviors to execute based on a set probability. The probabilities set within the probability module can be adjusted in real time based on demand, allowing the traffic simulation node to better mimic the traffic behavior of a real node.
[0091] In a possible implementation, the selective traffic sending behavior can be implemented in a variety of ways. The selective traffic sending behavior is that a node needs to select one of a plurality of traffic sending behaviors to execute. For example, after the login module 302 receives the third traffic information, it needs to select to send the fourth traffic information or the fifth traffic information. The specific implementation of the above selection behavior can be determined by extracting the historical selection probability of the real node corresponding to the login module 302, or it can be considered that a certain behavior rule is set, which can make the login module 302
[0092] Traffic sending and receiving behavior: Traffic sending and receiving behavior is a general term for the behavior of a working node receiving and sending traffic. Traffic sending and receiving behavior can include actively sending traffic, receiving traffic, and forwarding traffic.
[0093] Traffic sending and receiving information: Traffic sending and receiving information refers to the relevant information about the traffic sending and receiving behavior of a certain working node.
[0094] Traffic behavior rules: A set of rules that a worker node uses to execute related traffic receiving and sending behaviors. For example, if module A receives the first traffic and then sends the second traffic to traffic analysis module 702, the traffic behavior rule for module A is: receive the first traffic, then send the second traffic to traffic analysis module 702.
[0095] The content of the above-mentioned first flow or second flow can be meaningless trigger information, or it can be information that has been agreed to have a certain meaning. For example, if the flow information sent by user 301 to login module 302 in the real system only contains the user password or login request, the first flow information in the simulation system can be set as a meaningless trigger information. As long as this trigger information is received, the corresponding passive response rule will be automatically executed. If the third flow information returned by database 303 to login module 302 contains two types of results, namely, the password is correct or the password is incorrect, the login module 302 can decide to send the fourth flow information or the fifth flow information based on the content of the third flow information. At this time, the third flow information can include 0 or 1 or other two types of information with different meanings. Among them, 0 can represent a correct password and 1 can represent an incorrect password. The login module 302 can perform subsequent flow sending and receiving behaviors based on the specific content of the received third flow information.
[0096] Proxy forwarding rule 203, the proxy forwarding rule can be that when a module receives a certain flow information, it executes a certain forwarding action, or executes a certain forwarding action after completing certain business behaviors. The following is an example with reference to FIG3. When the login module 302 receives the first flow information of the user 301, it can directly forward this information to the database 303, or it can forward the above flow information after processing its behavior internally (for example, verifying whether it is a malicious attack). The above behavior can be summarized as the proxy forwarding rule of the login module 302. The proxy forwarding rule is that after receiving the first flow information of the user 301, the login module 302 forwards the first information to the database 303 (equivalent to sending the second information).
[0097] Active request rules 204 can be behavioral rules whereby a module proactively sends traffic information to other modules. As illustrated below with reference to FIG3 , the simulation system can configure a user 301 module to simulate a user's request behavior. For example, if user 301 frequently sends first traffic information to login module 302 at a fixed frequency, or suddenly increases the frequency of sending first traffic information during a certain period of time, these behaviors can be summarized as active request rules. The active request rules state that user 301 proactively sends first traffic information to login module 302 at fixed intervals, or sends first traffic information to login module 302 at random intervals.
[0098] For another example, all modules can be configured with a heartbeat detection function, which requires all modules to routinely send information to the system management module every fixed time so that the system management module can determine the operating status of all modules. The above heartbeat detection behavior can also be summarized as an active request rule.
[0099] The types of traffic behavior rules are not limited and can be set according to the actual behavior of real nodes. The actual traffic behavior rules may not be any of the above three behavior rules, or may include one or more of the above behaviors or their permutations and combinations.
[0100] The implementation of the above-mentioned traffic behavior rules can also be assisted by the event definition rules 205. The event definition rules 205 are to imitate the behavior rules of a real event by adjusting the relevant traffic behavior rules or operating status of the traffic simulation node. The following is an example with reference to FIG3. For example, the event definition rule can be defined as follows: when a specific time is reached, the frequency of sending the first traffic information of user 301 is increased to 100 times the usual frequency to imitate the scene of some instantaneous traffic outbreak (such as Double Eleven). The event definition rule can also be defined as randomly shutting down a service module at fixed or irregular intervals to imitate the occurrence of a downtime event. The above-mentioned events can be summarized as corresponding event definition rules waiting to be executed. When the above-mentioned event definition rules are executed, event effects corresponding to the events should be generated, such as a surge in traffic, service downtime, etc.
[0101] State cache rules 206, the state cache rules may include the conditions for the module to change state, and the consequences of the state change. The following example is given in conjunction with Figure 3. If the default state of the business module 304 is not to respond to the request of user 301, because the user 301 at this time has not yet passed the verification of the login module 302, it is not yet certain whether it is a legal user. After the user 301 passes the verification of the login module 302, the login module 302 sends the fifth flow information to the business module 304. At this time, the business module 304 is regarded as a state change, and can respond to the request of user 301 and return the sixth flow information to user 301. The above rules can be summarized as follows: default state: do not receive the request of user 301. Trigger state: receive the request of user 301 and return the sixth flow information to it, trigger condition: receive the fifth flow information of the login module 302.
[0102] The state cache rule 206 can also be used to simulate different operating states of real nodes. For example, if the work content of the real node is rendering, and the rendering work needs to last for 1 hour, when the rendering node receives a status query request, it may return three results to it according to the actual state: rendering not started, rendering in progress, and rendering completed. The state cache rule 206 can be set as follows: before receiving the rendering request, return: 0 to the status query request, indicating that rendering has not started. Within 1 hour after receiving the rendering request, return: 1 to the status query request, indicating that rendering is in progress. After 1 hour after receiving the rendering request, return: 2 to the status query request, indicating that rendering is completed.
[0103] S102: Arrange traffic simulation nodes according to traffic behavior rules of real nodes.
[0104] The method for arranging the traffic simulation nodes may be to write specific functions according to traffic behavior rules to execute the above rules.
[0105] In this implementation, the specific function only needs to be able to execute all the traffic behavior rules extracted by a certain module, without having to implement the specific business content of the module. In conjunction with Figure 3, an example is given. In a real system, when the database 303 receives the second traffic information (user password) sent by the login module 302, it needs to complete internal verification and return the third traffic information to the login module 302 based on the verification result. In the process of traffic simulation node arrangement, the traffic simulation node corresponding to the database 303 only needs to perform the following functions: receive the second traffic information, and after receiving the second traffic information, return the third traffic information to the login module 302. The traffic simulation node does not need to have an internal verification function, so naturally it does not need the corresponding business code to implement this function. The second traffic information does not need to be a real business password, and can be replaced by a simple 0 or other information. The actual code required to implement the above-mentioned traffic behavior rules is greatly reduced compared to the complete code of the original business module. Only fewer functions are required to execute the above-mentioned traffic behavior rules. Therefore, the simulation node generated according to this method can be called a traffic simulation node.
[0106] A possible implementation of a traffic simulation node is described below with reference to FIG4 .
[0107] The traffic simulation node may include a traffic behavior rule module 401 , an execution engine module 402 , a state cache 403 , an event simulator 404 , and a multi-protocol connection pool 405 .
[0108] The traffic behavior rule module 401 can store the traffic behavior rules of the traffic simulation node in the form of target code or source code. When the target code is executed or the source code is compiled and then executed by the central processing unit, the traffic simulation node can perform the corresponding traffic behavior.
[0109] The traffic behavior rule module 401 can also be a traffic behavior rule stored in other ways such as low code or plain text. When the traffic behavior rule module 401 is a traffic behavior rule stored in other ways such as low code or plain text, a parsing module needs to be deployed in the traffic simulation node. The parsing module is used to parse the traffic behavior rule module 401 and convert it into executable code. When the code is executed, the traffic simulation node can execute the corresponding traffic behavior.
[0110] The traffic behavior rule module 401 may include passive response rules, proxy forwarding rules, active request rules, etc.
[0111] In a possible implementation, the traffic behavior rules may further include event definition rules and state cache rules.
[0112] The execution engine module 402 is used to drive the traffic behavior rule execution module 401, which can execute instructions stored in the traffic behavior rules, so that the traffic simulation node can perform the corresponding traffic sending and receiving actions.
[0113] The state cache 403 may include a cache layer, in which the state information of the traffic simulation node may be cached. The state information may include a default state or a special state, and the special state may be a state other than the default state. The state cache 403 may record the triggering rules for the default state and the special state, as well as the new traffic behavior rules executed after the triggering. The traffic behavior rules stored in the state cache may be driven by the execution engine module 402 or driven by itself.
[0114] In one possible implementation, after a special state is triggered in the state cache 403, the traffic behavior rule module 401 can be directly modified so that the traffic behavior corresponding to the traffic behavior rule module 401 corresponds to the traffic behavior of the special state. In another possible implementation, after a special state is triggered in the state cache 403, the execution engine module can also be caused to directly execute the new traffic behavior rule. The execution method can be to cause the execution engine module to directly execute the traffic behavior rule corresponding to the special state cached in the state cache.
[0115] The event simulator 404 can store the code required to implement event definition rules. The code can be driven by the event simulator itself or by the execution engine module 402. After being driven, the code can implement the behavioral logic of the corresponding event, such as increasing the frequency of traffic transmission and reception or closing the traffic simulation node.
[0116] In one possible implementation, the simulation system can deploy a separate event simulation node rather than deploying an event simulator 404 within each traffic simulation node. In this implementation, the event simulation node can selectively send event execution instructions to specific or all traffic simulation nodes as needed. The instructions can include a complete event execution method or simply a 0 or 1 instruction. The event execution method can be stored and executed internally by the traffic simulation node.
[0117] In this embodiment, the event simulator inside the traffic simulation node only needs to execute the event execution method received from the event simulation node. The method can be sent in the form of a complete execution code. When the execution code is executed, the traffic simulation node can implement the behavioral logic of the corresponding event. The method can also be received in the form of text information or low code. When the method is received in the form of text information or low code, a parsing module can be configured inside the traffic simulation node. The parsing module can parse the text information or low code into a target code that can be executed by the central processing unit.
[0118] The multi-protocol link pool 405 can be configured with multiple communication protocols to facilitate communication between the various traffic simulation nodes. To better simulate a real system, each working node in the real system may use different communication protocols. Therefore, the traffic simulation nodes can be configured to use the same communication method as the corresponding real working nodes to improve the realism of the simulation system.
[0119] The multi-protocol connection pool 405 can also be used to perform communication work between the traffic simulation node and other modules, such as the registration management node, the event simulation node, etc., so the multi-protocol connection pool 405 can also be regarded as a communication module. The multi-protocol connection pool 405 can also be configured to have the function of a parsing module. When the multi-protocol connection pool 405 receives external traffic, if the external traffic carries complete execution code, the execution code can be submitted to the execution engine module for execution. When the external traffic carries text information or low code, the multi-protocol connection pool 405 can translate the text information or low code into executable code.
[0120] In a possible embodiment, the multi-protocol connection pool 405 can also store specific parsing rules, which can enable the traffic simulation node to execute specific execution code when receiving specific traffic information. The method of executing the specific execution code can be to trigger a traffic behavior in the traffic behavior rule module 401. With reference to Figure 3, when the multi-protocol connection pool 405 is the multi-protocol connection pool of the login module, when it receives the third traffic information, if the third traffic information is 0, the multi-protocol connection pool can query whether the relevant parsing rules for the third traffic information are stored internally. If the parsing rules related to the third traffic information are queried, the relevant parsing behavior is executed. If the third traffic information is 0, it means that the password is wrong, then the login module 302 executes the traffic behavior of returning the fourth traffic information to the user 301. If the third traffic information is received as 1, and the meaning of the third traffic information being 1 is that the password is correct, then the login module 302 sends the fifth traffic information to the business module 304.
[0121] In one possible implementation, the simulation system may include both traffic simulation nodes and ordinary simulation nodes or real working nodes. The traffic simulation nodes need to communicate with multiple types of nodes at the same time, and the messages of different types of communication protocols received by them can be received, parsed or forwarded through a multi-protocol link pool.
[0122] The aforementioned traffic behavior rule module 401, execution engine module 402, state cache 403, event emulator 404, and multi-protocol connection pool 405 can be considered as individual modules, such as a traffic behavior rule module, an execution engine module, a state cache module, an event emulator module, a multi-protocol connection pool module, etc. The aforementioned modules can be configured such that one program performs the functions of one module, one program performs the functions of multiple modules, multiple programs perform the functions of one module, or any combination thereof. The present invention does not impose any limitation on the specific deployment method thereof.
[0123] A method for generating a traffic simulation node is described below with reference to FIG5 . The method for generating a traffic simulation node includes:
[0124] S501, traffic acquisition, the traffic acquisition includes acquiring traffic receiving and sending information of the real system / real system working node, such as the first traffic information received by the login module 302, the second traffic information sent by the login module 302, etc.
[0125] S502, traffic analysis, the traffic analysis includes extracting traffic behavior rules based on the traffic receiving and sending information of the real system / real system working node. The extracted traffic behavior rules may include passive response rules, proxy forwarding rules, active request rules, event definition rules, state cache rules, etc. The method for extracting traffic behavior rules may be to analyze the traffic receiving and sending information of the working node of the real system and infer them. Taking Figure 3 as an example, when it is analyzed that the login module 302 sends the second traffic information to the database 303 every time it receives the first traffic information, the sending of the second traffic information and the receiving of the third traffic information can be regarded as sub-calls of the first traffic information, and defined as a traffic behavior rule. The method for extracting the traffic behavior rules may also be to analyze the request content of the first traffic information. If the request content of the first traffic information contains the processing method of the login module 302 for the first traffic information, then its method is defined as a traffic behavior rule.
[0126] The traffic analysis step may also include analyzing other traffic receiving and sending information of the real system to extract the traffic behavior rules. For example, when the traffic receiving and sending information shows that every time the time reaches 10 o'clock in the evening, the amount of traffic transmission between systems will increase to 10 times the normal state, the traffic increase of 10 times every fixed time can be summarized as a traffic behavior rule. When the traffic receiving and sending information shows that the amount of the first traffic information is 10% more than the second traffic information, it is possible that the login module 302 is down or due to other factors, resulting in the forwarding of the second traffic information being reduced by 10% compared to the received first traffic information. The amount of the second traffic information being reduced by 10% compared to the first traffic information can also be summarized as a traffic behavior rule. The summary and induction method of the traffic rules can be set and adjusted according to the actual operating characteristics of the system.
[0127] S503, generate a traffic simulation node. The method for generating a traffic simulation node includes arranging a simulation model according to traffic behavior rules or other rules. The simulation model may be arranged in such a way that executable code is written according to the traffic behavior rules, and the code is capable of executing the above traffic behavior rules when running. When generating a traffic simulation node, at least one execution engine module may also be configured for the traffic simulation node, and the execution engine module is used to drive the execution of the above executable code written according to the traffic behavior rules. The method for generating a traffic simulation node may also include combining the traffic behavior rules, the execution engine module, the state cache, the event simulator, and the multi-protocol link pool into a separately deployable program for deployment in a computing instance to form a traffic simulation node.
[0128] In a possible implementation, the simulation node generation method may further include S504 simulation measurement, which includes comparing the simulation system with the real system to find differences in traffic behavior rules between the simulation system and the real system for subsequent optimization of the simulation system's behavior.
[0129] In a possible implementation, the simulation measurement further includes recommending new traffic behavior rules, or recommending an improvement method for the traffic behavior rules of the simulation system, based on differences between the traffic behavior rules of the simulation system and the real system.
[0130] A simulation measurement method is introduced below with reference to FIG6 .
[0131] The simulation measurement method can be executed by a simulation measurement device, and the simulation measurement method includes:
[0132] S601 Traffic recording: Record traffic of both the real system and the simulated system to extract traffic sending and receiving information. The recording method can adopt traffic probe technology or read traffic logs.
[0133] S602 compares the traffic of the real system with the traffic of the simulation system. The traffic comparison can be a comparison of the differences in their traffic receiving and sending information, that is, comparing the differences in sub-calls, etc., or it can be a comparison of the differences in their traffic behavior rules, such as comparing the similarities and differences in the traffic behavior rules of a certain working node and its corresponding simulation node, or comparing the differences and similarities in traffic transmission and forwarding in the entire system.
[0134] S603 summarizes the traffic differences. The traffic differences may be differences between traffic transceiver information of the real system and traffic transceiver information of the simulation system, or differences between traffic behavior rules of the real system and traffic behavior rules of the simulation system.
[0135] S604 recommends new rules, and the recommended new rules may be new traffic behavior rules generated based on the traffic difference between the real system and the simulation system, or may be adjustment measures for the original traffic rules of the simulation system generated based on the traffic difference between the real system and the simulation system. The method of recommending new rules may be to adjust the traffic behavior rules of the simulation system so that the traffic behavior rules of the simulation system are closer to the traffic behavior rules of the real system. The method of adjusting the traffic behavior rules of the simulation system may be to adjust the traffic behavior rules of the corresponding simulation node based on the traffic transceiver information of a certain working node in the real system. The method of adjusting the traffic behavior rules of the simulation system may also be to extract the traffic behavior rules of the working node of the real system based on the traffic transceiver information of the working node, compare the traffic behavior rules of the working node of the real system with the traffic behavior rules of the corresponding simulation node, and adjust the traffic behavior rules of the working node of the simulation system.
[0136] In a possible implementation, before the traffic recording in S601 , the same traffic may be input to both the real system and the simulation system to observe the difference between the real system and the simulation system under the same traffic input, thereby improving the accuracy of the simulation measurement.
[0137] In a possible implementation, the simulation measurement device can periodically perform simulation measurement on the real system and the simulation system, so that the simulation system can automatically adapt to the updates of the real system.
[0138] In one possible implementation, if a system contains both real and simulated nodes, the traffic of the real nodes can be compared with the traffic of the simulated nodes. This allows observing how the real and simulated nodes handle the injected traffic differently, and based on these differences, recommending new traffic behavior rules for the simulated nodes. In this case, the traffic of the real nodes can be considered the traffic of the real system, and the traffic of the simulated nodes can be considered the traffic of the simulated system.
[0139] The simulation measurement method can be used for simulation measurement between a real system and a simulation system, so that the simulation system can simulate the real system more realistically. It can also be used for simulation measurement between simulation systems to determine which simulation system has a better degree of simulation or a more excellent simulation performance. In one possible implementation, when different traffic behavior rules exhibit different simulation performance, different simulation systems / nodes using different traffic behavior rules can be scored according to the quality of the simulation performance, and finally the final recommended traffic behavior rule can be selected based on the comprehensive scoring results.
[0140] The performance of the simulation can be comprehensively evaluated based on the following reference factors:
[0141] Availability: Availability refers to the duration of continuous operation of the simulation system, which can be measured using mean time between failures (MTBF) and recoverability. MTBF is the total system operating time divided by the number of failures that occurred during that time. Recoverability refers to the system's ability to recover to normal operation after a failure. Higher availability indicates a higher score for the corresponding traffic behavior rule.
[0142] Working capacity: The working capacity includes the capabilities of the simulation system under normal working conditions. The capabilities may include throughput, delay, and resource utilization.
[0143] Throughput: Throughput refers to the system's processing capacity per unit time, which includes the number of tasks completed by the system within that unit time. Throughput may have different meanings for different systems or nodes. For example, for a database node, throughput may refer to the number of password queries completed within a unit time. For a login module, throughput may refer to the number of instructions returned in response to login requests within a unit time. Generally speaking, the greater the throughput, the higher the score of the corresponding traffic behavior rule.
[0144] Latency: Latency includes the time it takes to complete a task. For example, if the node is a database node, the latency includes the time it takes to complete a query or data processing. If the node is a network node, the latency includes the time it takes to send a data packet. Generally speaking, the lower the latency, the higher the score of the corresponding traffic behavior rule.
[0145] Resource utilization: The resource utilization includes the system resources required for the system or node to complete a task. For example, when the node is a database node, it takes the processor time, the size of the memory occupied, or the size of the network bandwidth occupied to complete a data processing. When evaluating the resource utilization of the system, you can refer to the different situations of overall resource occupation by different systems under the same traffic input, or refer to the load rate of different systems under the same traffic input. The scoring rules for resource utilization can be set according to actual conditions. Generally speaking, too high or too low resource utilization may make the system unable to operate in the optimal state.
[0146] After obtaining the comprehensive scores of different systems / nodes, different traffic behavior rules can be arranged according to the score results, and the traffic behavior rule with the highest score can be recommended to the system / node.
[0147] When most simulation measurement methods are used for simulation measurement between a real system and a simulated system, the score can be evaluated based on the degree of proximity to the real system. For example, when the latency of the real node is 30ms, the latency of the first traffic simulation node is 25ms, and the latency of the second traffic simulation node is 20ms. Although generally speaking, the lower the latency of a node, the better the performance of the node, and the better the overall score. However, in the simulation scenario, since the latency of the real node is 30ms, although the latency of the first traffic simulation node is higher than that of the second traffic simulation node, the latency of the first traffic simulation node of 25ms is closer to the latency of the real node of 30ms, so the traffic behavior rule corresponding to the first traffic simulation node can obtain a higher score.
[0148] A traffic simulation node generation device is described below with reference to FIG7 .
[0149] The present application also provides a traffic simulation node generation device, as shown in FIG7 , comprising:
[0150] Traffic acquisition module 701, traffic analysis module 702, and traffic simulation node generation module 703. The traffic analysis module 702 is used to execute the traffic analysis method in S502. The traffic simulation node generation module 703 is used to execute the method for generating traffic simulation nodes in S503.
[0151] The traffic acquisition module 701, traffic analysis module 702, and traffic simulation node generation module 703 can all be implemented via software or hardware. For example, the implementation of traffic acquisition module 701 will be described below using traffic acquisition module 701 as an example. Similarly, the implementation of traffic analysis module 702 and traffic simulation node generation module 703 can refer to the implementation of traffic acquisition module 701.
[0152] As an example of a software functional unit, the traffic acquisition module 701 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the traffic acquisition module 701 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0153] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0154] As an example of a hardware functional unit, the traffic acquisition module 701 may include at least one computing device, such as a server. Alternatively, the traffic acquisition module 701 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0155] The multiple computing devices included in traffic acquisition module 701 can be distributed in the same region or in different regions. The multiple computing devices included in traffic acquisition module 701 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in traffic acquisition module 701 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0156] It should be noted that, in other embodiments, the traffic acquisition module 701 can be used to execute any step in the method shown in FIG5 , the traffic analysis module 702 can be used to execute any step in the method shown in FIG5 , and the traffic simulation node generation module 703 can be used to execute any step in the method shown in FIG5 . The steps that the traffic acquisition module 701, the traffic analysis module 702, and the traffic simulation node generation module 703 are responsible for implementing can be specified as needed. By respectively implementing different steps in the method shown in FIG5 by the traffic acquisition module 701, the traffic analysis module 702, and the traffic simulation node generation module 703, all functions of the YY device can be realized. The following introduces a method for deploying traffic simulation nodes in conjunction with FIG8
[0157] S801: Obtain a traffic simulation node. The traffic simulation node can be obtained by using a simulation generation system to generate a simulation node, or by using a packaged traffic simulation node provided by others, or by other means.
[0158] S802: Deploy the traffic simulation node into the simulation system. The simulation system may be a computer system designed with microservices in mind. The deployment method may be to register the traffic simulation node with the simulation system. The simulation system may include a registration management node for finding, discovering, and managing newly activated working nodes. The registration management node may be a module deployed with registration management software such as Eureka, Zookeeper, or Nacos, or may be deployed with other modules having similar functions.
[0159] The working nodes of the simulation system can be all simulation nodes or some real working nodes. The simulation nodes can be all traffic simulation nodes or a combination of traffic simulation nodes and other types of simulation nodes. The simulation system can be a computer system deployed separately from the real system, or it can be an operating state of the real system. If at least one node running within a system is a simulation node, then the system can also be called a simulation system.
[0160] A registration module may also be deployed inside the traffic simulation node, and the registration module may enable the traffic simulation node to register with the registration management node and receive and execute related instructions.
[0161] This application also provides a computing device 1000. As shown in Figure 9, computing device 1000 includes a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. Processor 1004, memory 1006, and communication interface 1008 communicate with each other via bus 1002. Computing device 1000 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 1000.
[0162] Bus 1002 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG9 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 1004 may include a path for transmitting information between various components of computing device 1000 (e.g., memory 1006, processor 1004, and communication interface 1008).
[0163] The processor 1004 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0164] The memory 1006 may include volatile memory, such as random access memory (RAM). The processor 1004 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0165] The memory 1006 stores executable program code, and the processor 1004 executes the executable program code to respectively implement the functions of the aforementioned traffic analysis device and simulation model arrangement device, thereby implementing the method shown in Figure 5. That is, the memory 1006 stores instructions for executing the method shown in Figure 5.
[0166] The communication interface 1003 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1000 and other devices or a communication network.
[0167] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0168] As shown in Figure 10, the computing device cluster includes at least one computing device 1000. The memory 1006 in one or more computing devices 1000 in the computing device cluster may store the same instructions for executing the method shown in Figure 5.
[0169] In some possible implementations, the memory 1006 of one or more computing devices 1000 in the computing device cluster may also respectively store some instructions for executing the method shown in Figure 5. In other words, the combination of one or more computing devices 1000 can jointly execute the instructions for executing the method shown in Figure 5.
[0170] It should be noted that the memory 1006 in different computing devices 1000 in the computing device cluster can store different instructions, each for executing a portion of the functions of the simulation generation system. In other words, the instructions stored in the memory 1006 in different computing devices 1000 can implement the functions of one or more devices in the simulation generation system.
[0171] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network or a local area network, etc. FIG11 shows a possible implementation. As shown in FIG11 , two computing devices 1000A and 1000B are connected via a network. Specifically, the connection to the network is made through a communication interface in each computing device. In this type of possible implementation, the memory 1006 in the computing device 1000A stores instructions for executing the functions of the traffic acquisition device and the traffic analysis device. At the same time, the memory 1006 in the computing device 1000B stores instructions for the traffic simulation node orchestration device.
[0172] It should be understood that the functions of the computing device 1000A shown in FIG11 may also be completed by multiple computing devices 1000. Similarly, the functions of the computing device 1000B may also be completed by multiple computing devices 1000.
[0173] The present application also provides a computer program product comprising instructions. The computer program product may be software or a program product comprising instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the method shown in FIG5 .
[0174] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the method shown in Figure 5.
[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for constructing a three-dimensional model of a virtual space, characterized in that: The method comprises: Acquire a three-dimensional model of a plurality of elements, wherein the plurality of elements are used to form a three-dimensional model of a virtual space; converting the non-target format portions of the three-dimensional models of the plurality of elements into a target format of the target virtual space; The three-dimensional models of the multiple elements are combined to obtain a three-dimensional model of the target virtual space.
2. The method according to claim 1, characterized in that The target format is the movie box FBX format or the universal scene description USD format.
3. The method according to claim 1, characterized in that Before converting the non-target format parts of the three-dimensional models of the plurality of elements into the target format of the target virtual space, the method further comprises: Determine the format of the three-dimensional model of each element; A format that appears most frequently in the three-dimensional models of the plurality of elements is determined as the target format.
4. The method according to any one of claims 1 to 3, characterized in that: The three-dimensional models of the multiple elements include at least two types of initial space type, character type, object type, and interaction type.
5. The method according to any one of claims 1 to 4, characterized in that: Before combining the three-dimensional models of the multiple elements to obtain the three-dimensional model of the target virtual space, the method further includes: Determine the type of each element; A size range corresponding to the type of each element is obtained, and if the size of the three-dimensional model of the target format of any element does not conform to the size range, the size of the three-dimensional model of the target format of the element is adjusted to be within the size range.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining relative position information of the multiple elements; The combining the three-dimensional models of the plurality of elements to obtain the three-dimensional model of the target virtual space includes: Based on the relative position information of the multiple elements, the three-dimensional models of the multiple elements in the target format are combined to obtain the three-dimensional model of the target virtual space.
7. The method according to claim 6, characterized in that The plurality of elements include an element of an initial space type, and the relative position information of the plurality of elements includes a relative position of each element of another type relative to the element of the initial space type; The step of combining the three-dimensional models of the target format of the multiple elements based on the relative position information of the multiple elements to obtain the three-dimensional model of the target virtual space includes: Based on the relative position of each other type of element relative to the element of the initial space type, the three-dimensional model of the target format of each other type of element is added to the three-dimensional model of the target format of the element of the initial space type to obtain the three-dimensional model of the target virtual space.
8. The method according to any one of claims 1 to 7, characterized in that: The obtaining of the three-dimensional models of the multiple elements comprises: Obtaining identification information of the multiple elements; Based on the identification information, a three-dimensional model of the element corresponding to the identification information is obtained in an element model library.
9. A device for constructing a three-dimensional model of a virtual space, characterized in that: The device comprises: An acquisition module, used for acquiring three-dimensional models of multiple elements, wherein the three-dimensional models of the multiple elements are used to form a target virtual space; A conversion module, configured to convert a portion of the three-dimensional models of the plurality of elements that is not in a target format into a target format of a target virtual space; The combination module is used to combine the three-dimensional models of the multiple elements to obtain the three-dimensional model of the target virtual space.
10. The device according to claim 9, characterized in that The target format is the movie box FBX format or the universal scene description USD format.
11. The device according to claim 9, characterized in that The conversion module is further used for: Determine the format of the three-dimensional model of each element; A format that appears most frequently in the three-dimensional models of the plurality of elements is determined as the target format.
12. The device according to any one of claims 9 to 11, characterized in that: The three-dimensional models of the multiple elements include at least two types of initial space type, character type, object type, and interaction type.
13. The device according to any one of claims 9 to 12, characterized in that: The combined module is also used for: Determine the type of each element; A size range corresponding to the type of each element is obtained, and if the size of the three-dimensional model of the target format of any element does not conform to the size range, the size of the three-dimensional model of the target format of the element is adjusted to be within the size range.
14. The device according to any one of claims 9 to 13, characterized in that: The acquisition module is further used for: Obtaining relative position information of the multiple elements; The combined module is used for: Based on the relative position information of the multiple elements, the three-dimensional models of the multiple elements in the target format are combined to obtain the three-dimensional model of the target virtual space.
15. The device according to claim 14, characterized in that The plurality of elements include an element of an initial space type, and the relative position information of the plurality of elements includes a relative position of each element of another type relative to the element of the initial space type; The combined module is used for: Based on the relative position of each other type of element relative to the element of the initial space type, the three-dimensional model of the target format of each other type of element is added to the three-dimensional model of the target format of the element of the initial space type to obtain the three-dimensional model of the target virtual space.
16. The device according to any one of claims 9 to 15, characterized in that: The acquisition module is used to: Obtaining identification information of the multiple elements; Based on the identification information, a three-dimensional model of the element corresponding to the identification information is obtained in an element model library.
17. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein the memory is used to store computer instructions; The processor executes the computer instructions stored in the memory to enable the computer device to perform the method according to any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code. In response to the computer program code being executed by a computer device, the computer device executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-person cooperation AR assembly method and system based on digital twinning
CN113673894A
Three-dimensional model processing method and device, storage medium and electronic equipment
CN115375845A
Dust collection air conditioner for food factory
KR102528784B1
System and method for applying digital hologram
WO2019107637A1
Cited By
Simulation topology node evaluation method and device, computer equipment and storage medium
CN120768790A
