Human-computer interaction force simulation method and device and electronic equipment

CN122839699APending Publication Date: 2026-09-29SHENZHEN TENCENT COMP SYST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510394858.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2026-09-29

AI Technical Summary

Benefits of technology

通过对目标对象的目标部位和机器人分别进行建模,获得目标部位的第一网格模型和交互对象的第二网格模型,本申请实施例在对目标部位进行建模时,基于目标部位的各个组织的物理和化学特征,分别对各个组织进行建模,从而获得的第一网格模型包括目标部位各个组织的子网格模型,可以更精准地捕捉目标部位中各个组织的结构、形态和位置关系,提升模型的准确性,并且,各个子网格模型中还特别包括了皮肤的第一子网格模型,皮肤组织具有复杂的力学性质,这些性质在手臂的力学响应中起着重要作用,通过建立皮肤组织的子模型,可以更精确地模拟皮肤的力学特性,从而提高仿真的准确性,并且皮肤也是与交互对象直接接触的组织,创建第一子网格模型,这有助于更准确地预测手臂在不同外力作用下的力学响应(如变形、应力和应变等),本申请实施例进一步确定约束函数集,所述约束函数集中的每个约束函数的变量为所述第一网格模型中对应顶点的位置,约束函数的求解目标为相应约束函数的值最小化,确定的约束函数集提供了与各个顶点的位置相关的方程组,并且每个方程均与实际的物理意义、约束条件相关, 因此通过基于约束函数集中各约束函数的求解目标,对所述约束函数集中每个变量进行多轮迭代求解,即可获得第一网格模型中各个顶点的位置,所以求解获得的各个顶点的位置可靠性较高,进一步为了解决穿透问题,本申请实施例的约束函数集包括至少一个位垒约束函数,每个位垒约束函数用于确定所述皮肤的子网格模型中的一个第一单元与所述第二模型间的接触力,本方案通过考虑接触力一方面可提高穿透处理的鲁棒性,使得目标对象与机器人接触时不会穿透,另一方面在开销可控的同时保留了基于函数集进行迭代求解顶点位置所具有的自由度高的优势。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122839699A_ABST
    Figure CN122839699A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a human-computer interaction force simulation method and device, electronic equipment and computer readable storage medium, and relate to the field of robots. The method comprises: modeling a target part of a target object and a robot respectively, obtaining a first mesh model of the target part and a second mesh model of the robot; determining a constraint function set, each constraint function in the constraint function set having a variable being a position of a corresponding vertex in the first mesh model, wherein the constraint function set comprises at least one potential barrier constraint function; performing multi-round iterative solving on each variable in the constraint function set based on a solving target of each constraint function in the constraint function set, obtaining a target value of each variable in the constraint function set, and updating the positions of the vertices in the first mesh model. The embodiments of the present application realize non-penetrating interaction simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotics technology, and more specifically, to a human-computer interaction force simulation method, device, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] In recent years, the idea has been to combine computer technology with technologies from other fields to create simulation technology, thereby solving a series of problems encountered in actual industrial manufacturing during human development.

[0003] 3D reconstruction is a promising technology in scientific research, industry, and service sectors. 3D reconstruction of human-object interaction is a particularly popular research direction. Since the surface of human tissue is soft, how to express the mechanical effects after human-computer interaction in a more delicate and high-quality manner has become a major challenge. Summary of the Invention

[0004] This application provides a human-computer interactive force simulation method, device, electronic device, computer-readable storage medium, and computer program product, which can solve the above-mentioned problems of the prior art. The technical solution is as follows: According to one aspect of the embodiments of this application, a force simulation method for human-computer interaction is provided, the method comprising: Modeling is performed on the target part of the target object and the robot to obtain a first mesh model of the target part and a second mesh model of the robot. The first mesh model includes sub-mesh models of each tissue in the target part, including skin. A set of constraint functions is determined, wherein the variable of each constraint function in the set of constraint functions is the position of the corresponding vertex in the first mesh model. The set of constraint functions includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first cell in the sub-mesh model of the skin and the second model. When the first cell is an edge, the variable of the barrier constraint function is the position of the two vertices of the first cell. When the first cell is a vertex, the variable of the barrier constraint function is the position of the first cell. Based on the solution objective of each constraint function in the constraint function set, multiple rounds of iterative solution are performed on each variable in the constraint function set to obtain the objective value of each variable in the constraint function set, so as to update the position of each vertex in the first mesh model. The solution objective of each constraint function is to minimize the value of the corresponding constraint function.

[0005] According to another aspect of the embodiments of this application, a human-computer interaction force simulation device is provided, the device comprising: The modeling module is used to model the target part of the target object and the robot respectively, and obtain a first mesh model of the target part and a second mesh model of the robot. The first mesh model includes sub-mesh models of each tissue in the target part, and each tissue includes skin. A function determination module is used to determine a set of constraint functions. The variable of each constraint function in the set of constraint functions is the position of the corresponding vertex in the first mesh model. The set of constraint functions includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first cell in the sub-mesh model of the skin and the second model. When the first cell is an edge, the variable of the barrier constraint function is the position of the two vertices of the first cell. When the first cell is a vertex, the variable of the barrier constraint function is the position of the first cell. The iterative solution module is used to perform multiple rounds of iterative solution on each variable in the constraint function set based on the solution objective of each constraint function in the constraint function set, so as to obtain the objective value of each variable in the constraint function set and update the position of each vertex in the first mesh model. The solution objective of each constraint function is to minimize the value of the constraint function.

[0006] In some optional implementations, for each barrier constraint function, the barrier constraint function is used to determine the contact force between the first unit and the second unit based on the relationship between the shortest distance and the critical distance between the first unit and a second unit in the second model, and use this as the contact force between the first unit and the second model; The shortest distance between the first unit and a second unit in the second model is determined based on the positions of the vertices corresponding to the first unit and the second unit, respectively. The first unit is an edge, and the second unit is an edge; The first unit is a vertex, and the second unit is a mesh.

[0007] In some alternative implementations, the barrier constraint function is used for: When the shortest distance between the first unit and the second unit is not less than the critical distance, the contact force between the first unit and the second unit is determined to be a preset value. When the shortest distance between the first unit and the second unit is less than the critical distance, the shortest distance is used as the input of a preset exponential function to obtain a weight. Based on the shortest distance and the critical distance, a first value is obtained to represent the difference between the shortest distance and the critical distance. The first value is weighted according to the weight to obtain the contact force between the first unit and the second unit, wherein the exponential function is a decreasing function.

[0008] In some optional implementations, the constraint function set also includes at least one tension constraint function; Each tension constraint function is used to determine the change in the angle formed by two edges with the same vertex in the sub-mesh model of the skin, and the variable of the tension constraint function is the position of the common vertex of the two edges.

[0009] In some alternative implementations, the tissues also include muscle; The set of constraint functions also includes at least one distance constraint function and at least one volume constraint function; Each distance constraint function is used to determine the change in distance between two vertices of a corresponding edge in the sub-mesh model of the muscle, and the variable of the distance constraint function is the position of the two vertices of the corresponding edge; Each volume constraint function is used to determine the change in volume of a corresponding polyhedron in the sub-mesh model of the muscle. The polyhedron includes at least 4 meshes, and the variables of the volume constraint function are the positions of each vertex of the corresponding polyhedron.

[0010] In some optional implementations, the iterative solution module performs multiple rounds of iterative solution on the set of constraint functions, before always: initializing the operator of each constraint function and the mass of each vertex in the first mesh model, wherein the operator of each constraint function is used to represent the constraint condition of the constraint function; Each iteration of the iterative solution module on the constraint function set includes: For each constraint function, based on the value of each variable of the constraint function in the previous iteration, obtain the value of the constraint function in the current iteration and the gradient of each variable in the constraint function; For each constraint function, based on the quality of all variables of the constraint function, the value of the constraint function in this iteration, and the gradient of each variable in the constraint function, the change of the operator of the constraint function in this iteration is obtained. Based on the value of the operator of the constraint function in the previous iteration and the change in this iteration, the value of the operator of the constraint function in this iteration is obtained. For each vertex, each constraint function of the vertex is taken as a first constraint function. Based on the gradient of the vertex in the first constraint function and the mass of the vertex, the gradient of the vertex per unit mass in the first constraint function is obtained. Based on the value of the operator of each first constraint function in this iteration and the gradient of the vertex per unit mass in each first constraint function, the change in the position of the vertex in this iteration is obtained. Based on the change in the position of the vertex in this iteration and the value of the previous iteration, the value of the vertex in this iteration is obtained.

[0011] In some optional implementations, for each constraint function, based on the quality of all variables of the constraint function, the value of the constraint function in this iteration, and the gradient corresponding to each variable, the change in the operator of the constraint function in this iteration is obtained, including: For each variable of the constraint function, the magnitude of the constraint force per unit mass of the variable under the constraint function is obtained based on the gradient of the variable in the constraint function and the mass of the variable. Based on the preset adjustment parameters of the constraint function, the sum of the constraint forces corresponding to all variables per unit mass is adjusted to obtain the comprehensive constraint force of the constraint function; Based on the value of the constraint function in this iteration and the combined constraint force, the change of the operator of the constraint function in this iteration is obtained.

[0012] In some optional implementations, the function determination module determines the set of constraint functions and is also used for: Create a two-dimensional array, the two-dimensional data being used to record whether there are constraint relationships between any two vertices in the first mesh model; Obtain the initial identifier set for each vertex in the first mesh model. All vertices have the same identifier set in their initial identifier sets. For each vertex in the first mesh model, when configuring an identifier for the vertex, a target identifier is assigned to the vertex from the identifier set based on the organization corresponding to each vertex whose identifier has been assigned in the identifier set of the vertex, so that the number of vertices assigned the target identifier in each organization is evenly distributed, and the target identifier is removed from the identifier set of vertices that have a constraint relationship with it. The iterative solution module performs multiple rounds of iterative solutions for each variable in the constraint function set, including: In each iteration, all variables with the same identifier in the constraint function set are solved in parallel.

[0013] According to another aspect of the embodiments of this application, an electronic device is provided, the electronic device including a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described human-computer interaction force simulation method.

[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the above-described human-computer interaction force simulation method are implemented.

[0015] According to one aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described human-computer interaction force simulation method.

[0016] The beneficial effects of the technical solutions provided in this application are: By modeling the target part of the target object and the robot separately, a first mesh model of the target part and a second mesh model of the interactive object are obtained. In this embodiment, when modeling the target part, each tissue is modeled separately based on its physical and chemical characteristics. The resulting first mesh model includes sub-mesh models of each tissue in the target part, which can more accurately capture the structure, morphology, and positional relationships of each tissue in the target part, improving the model's accuracy. Furthermore, each sub-mesh model specifically includes a first sub-mesh model of the skin. Skin tissue has complex mechanical properties, which play an important role in the mechanical response of the arm. Establishing a sub-model of skin tissue allows for more accurate simulation of skin's mechanical properties, thereby improving simulation accuracy. Furthermore, skin is the tissue that directly contacts the interactive object. Creating a first sub-mesh model helps to more accurately predict the mechanical response of the arm under different external forces (such as deformation, stress, and strain). This embodiment further determines a set of constraint functions, where the variable of each constraint function in the set is the position of the corresponding vertex in the first mesh model. The objective of solving the constraint functions is to minimize their values. The determined set of constraint functions provides a set of equations related to the positions of each vertex, and each equation is related to the actual physical meaning and constraint conditions. Therefore, by performing multiple rounds of iterative solutions on each variable in the constraint function set based on the solution objectives of each constraint function, the positions of each vertex in the first mesh model can be obtained. Thus, the positions of each vertex obtained by the solution are highly reliable. Furthermore, in order to solve the penetration problem, the constraint function set of this application embodiment includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first unit in the sub-mesh model of the skin and the second model. This solution can improve the robustness of the penetration processing by considering the contact force, so that the target object will not penetrate when it comes into contact with the robot. On the other hand, it retains the advantage of high degree of freedom of iteratively solving the vertex position based on the function set while keeping the overhead controllable. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0018] Figure 1A A schematic diagram illustrating the application of the human-computer interaction force simulation method provided in this application to a rehabilitation training scenario; Figure 1B A schematic diagram illustrating the application of the human-computer interaction force simulation method provided in this application to a surgical simulation scenario; Figure 2 A schematic diagram of the overall process of a human-computer interaction force simulation method provided in this application embodiment; Figure 3 A flowchart illustrating a human-computer interaction-based force simulation method provided in this application embodiment; Figure 4 A schematic diagram illustrating the principle of a tension constraint function provided in an embodiment of this application; Figure 5 A schematic diagram illustrating the process of each iteration of the constraint function set provided in this application embodiment; Figure 6 A flowchart illustrating a human-computer interaction-based force simulation method provided in this application embodiment; Figure 7 A schematic diagram of the structure of a human-computer interaction force simulation device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0020] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0022] First, let's introduce and explain several terms used in this application: Human-computer interaction modeling and simulation is an interdisciplinary field involving computer science, cognitive science, and human factors engineering. It can be summarized as: using computer technology to simulate the interaction process between humans and machines by constructing mathematical models and simulation environments in order to evaluate and optimize the performance, user experience, and operational efficiency of human-computer interaction systems.

[0023] A mesh model is a model that approximates a three-dimensional object using a series of polygons (usually triangles) of similar size and shape. In a mesh model, vertices describe discrete samples of the model's spatial positions, primarily defining the model's geometric information; lines define the connections between vertices; and faces depend on the connections between vertices and are the basic units for mesh rendering. Lines and faces together describe the topological information of the model.

[0024] Penetration Issue: In interactive simulations, the penetration issue typically refers to the phenomenon where two or more simulated objects, during contact, inaccurately penetrate each other instead of contacting, colliding, or separating according to expected physical laws. This penetration phenomenon leads to inaccurate simulation results, affecting the reliability and effectiveness of the simulation analysis.

[0025] Existing simulation methods mainly suffer from the following problems: 1. It basically does not consider specific human tissue structures, such as targeted constraints in the skin, and lacks effective methods to improve simulation accuracy.

[0026] 2. There is a lack of methods to solve the penetration problem.

[0027] 3. It focuses on achieving a refined visual effect without considering the underlying physical properties of the simulation, such as the calculation of contact forces.

[0028] The human-computer interaction force simulation method, device, electronic device, computer-readable storage medium, and computer program product provided in this application are intended to solve the above-mentioned technical problems of the prior art.

[0029] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0030] Figure 1AThis diagram illustrates the application of the human-computer interaction force simulation method provided in this embodiment to a rehabilitation training scenario. Rehabilitation trainers can select a rehabilitation training mode through the user interface displayed on terminal 1101, such as selecting the patient's rehabilitation area and the equipment for rehabilitation training of that area. They can also create physiological parameters (e.g., physical density) of the rehabilitation area through the user interface. The trainer uses a 3D scanner 1102 to perform a 3D scan of the rehabilitation area to establish a 3D model. The rehabilitation training mode, the physiological parameters of the rehabilitation area, the 3D model, and the 3D model of the equipment are transmitted to server 1103. Server 1102 executes the force simulation method provided in this embodiment to simulate the force experienced by the rehabilitation area when interacting with rehabilitation equipment. Rehabilitation guidance device 1104 outputs the rehabilitation level and recommended rehabilitation exercise tutorials based on the simulation results, providing personalized rehabilitation training for the patient. Rehabilitation equipment can include robotic arms, exoskeleton robots, balance training boards, etc.

[0031] Figure 1B This diagram illustrates the application of the human-computer interaction force simulation method provided in this embodiment of the application to a surgical simulation scenario. The surgical simulation system utilizes virtual reality technology combined with human-computer interaction force analysis methods to provide medical personnel with a highly realistic surgical simulation environment. The system aims to improve the surgical skills of medical personnel, reduce risks in actual operations, optimize surgical procedures, and improve surgical efficiency. In this embodiment, a server 1201 is included to simulate human tissue, such as the simulation effect of the interaction (contact) between the heart and surgical instruments, according to the human-computer interaction force simulation method provided in this embodiment of the application. A display device 1202 provides realistic three-dimensional visual effects, making the doctor feel as if they are in a real surgical environment. An input device 1203 is used to capture the doctor's operating actions, such as a handle simulating the operation of surgical instruments, and a data glove capturing the fine movements of the fingers. A feedback device 1204 provides force feedback and tactile feedback, allowing medical personnel to feel the interaction force between surgical tools and virtual tissue.

[0032] Please see Figure 2 The figure illustrates an exemplary overall flowchart of the human-computer interaction force simulation method provided in this application embodiment. As shown in the figure, the method mainly includes the following steps: Tetrahedral meshing: In finite element analysis, tetrahedral meshes are a common mesh type, consisting of a three-dimensional element enclosed by four triangular faces, suitable for complex, irregular geometries. In this embodiment, the geometric representation of the target area and the robot is approximated using tetrahedral vertices, which serve as the basis for the simulation.

[0033] Binding tissues: In simulation, the various tissues of the target area need to be correctly represented and bound to the simulation system. This step involves detailed modeling of the geometry and physical properties (such as elasticity, density, etc.) of human tissues. In the embodiments of this application, the tissues may be represented by a series of vertices and the connections between them.

[0034] Defining constraint functions: Constraint functions are a core concept in the force simulation method of this application embodiment. They are used to describe the interactions and constraints between the vertices inside the first mesh model and between the vertices of the first and second mesh models. In the simulation of this application embodiment, various constraint functions are defined to simulate the physical interactions of human tissues, such as barrier constraints, tension constraints, distance constraints, volume constraints, etc.

[0035] Initialization state: Before the simulation starts, the initial state of all vertices of the first mesh model needs to be set, including position, velocity, mass, etc. It is also necessary to set the initial values ​​of the constraint function operators. These initial states will serve as the starting point of the simulation process.

[0036] Solving for constraint functions: Based on the defined constraint functions and the vertex positions, an iterative solution method is used to find new positions for particles that satisfy all constraints. After multiple iterations, the system reaches a stable state where all constraints are satisfied or within a certain tolerance range. In this stable state, the deformation effects of human tissue can be observed. These deformation effects are a direct reflection of the simulation results and can be used for further analysis and visualization.

[0037] This application provides a human-computer interaction-based force simulation method, such as... Figure 3 As shown, the method includes: S101. Model the target part of the target object and the interactive object respectively to obtain the first mesh model of the target part and the second mesh model of the interactive object.

[0038] The target object in the human-computer interaction referred to in this application embodiment can be a person or other living being, without specific limitations. The interaction object can be a rigid object such as a robot. A rigid object is an object that can maintain its shape and size basically unchanged under the action of external force. Compared with flexible or elastic objects, rigid objects are not easily deformed when subjected to external force. Correspondingly, the target object in human-computer interaction is a flexible object, that is, after contacting a rigid object, it will be deformed by the contact force, and after deformation, it can recover or maintain a new shape.

[0039] The embodiments of this application do not limit the target body part, such as the hand, arm, leg, foot or internal organs, etc. For ease of description, the following embodiments will be described using the upper arm as an example.

[0040] Modeling the target area—the upper arm—in this application embodiment may include the following steps: First, basic geometric modeling of the upper arm is performed, i.e., creating a three-dimensional model of the upper arm. This process includes two steps: data acquisition and three-dimensional reconstruction. This application embodiment supports data acquisition based on medical imaging, anthropometry, or reference models. Among them, the medical imaging-based method refers to using MRI or CT scans to obtain tomographic data of the upper arm; the anthropometry-based method is to acquire upper arm data based on laser scanning or a 3D body capture system; and the reference model-based method refers to obtaining a standard upper arm model from a public database (such as the Visible Human Project). In different application scenarios, this application embodiment can select an appropriate method from the above three methods for data acquisition. After obtaining the upper arm data, three-dimensional reconstruction is further performed. This application can process the data using medical imaging software (such as 3D Slicer) or CAD modeling. It should be understood that the key to the geometric modeling step is to accurately obtain anatomical structure data, especially the morphology of tissues such as bones, muscles, and skin. It can be understood that different tissues correspond to different sub-models, such as sub-three-dimensional models of bones, muscles, and skin, etc.

[0041] Then, the various sub-3D models are meshed, that is, the continuous geometric model is discretized into a finite number of small polyhedral (tetrahedral or hexahedral) elements to form a mesh. This step obtains the sub-mesh model of each tissue by meshing the sub-model separately. Furthermore, this application embodiment can set multiple indicators to evaluate the quality of the mesh, laying the foundation for obtaining more accurate simulation results. This application embodiment does not limit the type of indicator, such as Jacobian matrix, aspect ratio, curvature, etc. It should be noted that this application can also use different mesh densities for different tissues in the target area, such as finer meshes at joints or muscle attachment points to improve accuracy.

[0042] Next, the sub-mesh models of different organizations are preprocessed separately. Each preprocessed sub-mesh model is transformed into basic geometric data containing vertices, edges, and polygons (understandably, edges and polygons can be represented by sets of multiple vertices). After preprocessing the individual sub-mesh models, the three sub-mesh models are merged into a unified mesh structure (mesh model). Subsequently, the Delaunay partitioning algorithm is used to perform partitioning calculations on the merged mesh model. It should be noted that the Delaunay partitioning algorithm used in this embodiment can efficiently divide the mesh model into a series of interconnected polyhedra, thereby achieving detailed partitioning of the upper arm.

[0043] It should be understood that the approach to modeling interactive objects is similar to the approach to modeling target parts of target objects, except that it is not necessary to subdivide interactive objects into multiple parts; it is sufficient to model interactive objects as a whole.

[0044] This application embodiment models the target part of the target object to obtain the first mesh model of the target part. The first mesh model includes sub-mesh models of various tissues, including the first sub-mesh model of skin tissue (hereinafter referred to as skin). Compared with the traditional method that only considers the sub-mesh models of bones and muscles of the target part, this method takes into account that the skin, as the outermost tissue, is also the tissue that directly interacts with the interactive object and will be directly subjected to the stretching and deformation of contact forces. This also lays the foundation for further constructing the constraint relationship of different tissues, especially the constraint relationship between the skin and the interactive object, which can improve the realism and detail of the model and achieve high-precision simulation.

[0045] In some embodiments, after obtaining the sub-mesh models of each tissue, this application further establishes binding relationships between sub-mesh models of adjacent tissues. For example, it establishes binding relationships between sub-mesh models of muscles and bones, and between sub-mesh models of muscles and skin. By establishing binding relationships, these sub-mesh models can be grouped and optimized more easily, ensuring that soft tissues such as muscles and fat can deform accordingly when the skeleton moves, thus presenting a realistic animation effect. In this application, the simulation mainly focuses on the interaction between the target tissue skeleton and the interactive object. Therefore, the simulation focuses on the deformation of tissues such as muscles and fat when the skin moves. Taking skin-muscle as an example: First, the corresponding matching points between the muscle and the skin are found. This application uses the nearest point projection method to find the corresponding matching points between the skin and the muscle. The basic idea of ​​this method is to find the nearest point on the surface of the skin's sub-mesh model for each vertex on the muscle's sub-mesh model, and bind these two points together. This means that when the skin moves, this binding relationship will ensure that the vertices bound on the muscle can move accordingly.

[0046] This application's embodiments, through experiments, have shown that simply binding the muscle vertex to the nearest vertex of a bone may not be sufficient to achieve a realistic simulation effect. This is because in actual biomechanics, muscles are typically not connected to a single bone but may be influenced by multiple bones. Therefore, it is necessary to calculate binding weights to reflect this multi-bone influence. Specifically, firstly, based on anatomical knowledge and the specific design of the model, it is determined which bones influence the muscle vertex. For each determined bone, its influence weight on the muscle vertex is calculated based on distance-based weight allocation and muscle fiber direction-based weight allocation. Finally, the calculated weights are applied to the bone-muscle binding relationship. This means that when bones move, the movement of the muscle vertex will be subject to a weighted effect from all influencing bones.

[0047] Using this method, the embodiments of this application can achieve a more realistic and natural bone-muscle rigging effect. Similarly, this method can also be applied to the processing of rigging relationships between other layers such as muscle-fat. It should be noted that in practical applications, the processing of rigging relationships may involve more complexity and optimization issues, such as handling the interaction between different layers and avoiding rigging conflicts.

[0048] S102. Determine the set of constraint functions.

[0049] The embodiments of this application can determine a set of constraints, which includes constraints between vertices in the first mesh model and constraints between vertices of the first sub-mesh model and vertices of the second mesh model.

[0050] On the one hand, in the physical world, the interactions between objects are often limited by various constraints. For example, collisions between rigid bodies produce rebound forces, and soft bodies deform under external forces but are constrained by material properties. The embodiments of this application, by constructing constraints, can more realistically simulate these physical phenomena. On the other hand, during the simulation, if there are insufficient constraints to limit particle movement, the system may become unstable, exhibiting phenomena such as particle scattering or penetration. Constructing constraints helps maintain the stability and consistency of the system.

[0051] The constraints constructed in this application embodiment are mainly of two types. One type is the constraint between multiple vertices of the first mesh model. As can be seen from the above embodiments, the first mesh model of this application includes sub-mesh models of different tissues of the target part. Therefore, the first type of constraint covers the constraint between each vertex in each sub-mesh model. For example, volume constraint: used to keep the volume of the muscle constant, which helps to simulate the effect of the arm maintaining its overall shape when subjected to external force; stretch constraint: used to limit the stretching degree of the arm bones, which helps to prevent the arm bones from being over-stretched or shortened during the simulation; bend constraint: used to control the bending degree of the arm bones, which helps to simulate the bending and extension movements of the arm joints, making the arm movement more natural. The first type of constraint also covers the constraint between vertices in adjacent sub-mesh models. For example, transformation constraint allows one bone (each bone is a sub-mesh model) to follow the transformation (such as position, rotation, and scaling) of another bone. In the arm model, this can be used to simulate the relative movement between joints, such as the elbow joint following the movement of the upper arm.

[0052] Another type of constraint is the constraint specifically constructed for the first sub-mesh model of the skin, that is, the constraint between the vertices of the first sub-mesh model and the vertices of the second mesh model. By establishing the constraint between the vertices of the first sub-mesh model and the vertices of the second mesh model, the range of motion of the skin is limited, preventing it from crossing a virtual boundary or obstacle, and ensuring that the skin does not enter areas that it should not enter during the simulation, thereby maintaining the realism and accuracy of the simulation and laying the foundation for subsequent accurate and stable non-penetrating collision processing.

[0053] This application further defines a constraint function set, which includes at least one constraint function. A constraint function is a mathematical expression describing a constraint condition; that is, each constraint function corresponds to a constraint condition in the constraint condition set and is also used to determine a constraint force related to the function's variables. It's important to note that the constraint force can only be derived from intermediate variables in the solution process and does not directly affect the process of solving and updating vertex positions. Taking a distance constraint as an example, suppose there are two vertices A and B, and the distance between them is limited to a certain range. This distance constraint can be expressed as a constraint condition, namely, the distance d between vertices A and B must satisfy a certain inequality (e.g., d ≤ D, where D is the maximum allowed distance). This constraint condition can also be described by a constraint function, such as d = ||pA - pB||, where pA and pB are the position vectors of vertices A and B, respectively. During the solution process of the constraint function, the positions of vertices A and B are continuously iterated and updated to ensure that the distance between them satisfies the constraint condition.

[0054] The constraints in this embodiment describe the relationships between vertices. Therefore, when determining the corresponding constraint function based on the constraints, the variable of the constraint function is also the position of at least one vertex involved in the constraint in the first mesh model. That is, when the constraint object of a constraint includes vertices in both the first mesh model and the second model, the variable of the constraint function corresponding to the constraint is only the vertices in the first mesh model, excluding the vertices in the second model.

[0055] The constraint function set in this application includes at least one barrier energy constraint function. A barrier energy typically refers to an energy barrier or spatial obstacle that can hinder or restrict the movement of particles. The barrier energy constraint function in this application is used to describe the movement restrictions of vertices in a first sub-mesh model in space. For example, while a vertex in the first sub-mesh model is subjected to robot contact, it may also be restricted by other surrounding vertices. These obstacles can be considered as barriers, and the barrier energy constraint function is used to describe the influence of these obstacles on the vertex movement.

[0056] Each barrier constraint function in this embodiment corresponds to the constraint condition of the distance between at least one vertex in the first sub-mesh model and at least one vertex in the second mesh model. The barrier constraint function is used to determine the contact force (also called constraint force) between a first unit in the sub-mesh model of the skin and the second model. The objective of solving the barrier constraint function is to minimize the contact force. The type of the first unit in this embodiment can be an edge or a vertex. Since an edge can be represented by the vertices at both ends of the edge, when the first unit is an edge, the variable of the barrier constraint function is the position of the two vertices of the first unit. When the first unit is a vertex, the variable of the barrier constraint function is also the position of the first unit.

[0057] This application addresses the constraint condition of the distance between at least one vertex in the first sub-mesh model of the skin and at least one vertex in the second mesh model. Based on this constraint condition, a constraint function describing the contact force is constructed. This constraint function limits the contact force caused by the distance between the vertices of the first sub-mesh model and the second mesh model. Similarly, the capability function describes the system's capability performance under specific constraints. Therefore, the constraint condition of the distance between at least one vertex in the first sub-mesh model and at least one vertex in the second mesh model in this application embodiment can be regarded as a restriction or constraint on the system's capability (contact force), and thus the capability performance under this constraint can be represented by the capability function. It is understood that the contact force gradually decreases to 0 with the increase of distance, and approaches positive infinity when the distance approaches 0. The range of the function value of the barrier constraint function in this application embodiment is [0, +∞). The objective of solving the barrier constraint function is to minimize the function value, that is, to make the distance between the first unit and the second model as greater than or equal to the critical distance as possible.

[0058] S103. Based on the solution objective of each constraint function in the constraint function set, perform multiple rounds of iterative solution for each variable in the constraint function set to obtain the objective value of each variable in the constraint function set, so as to update the position of each vertex in the first mesh model, wherein the solution objective of each constraint function is to minimize the value of the corresponding constraint function.

[0059] The convergence condition of this application embodiment can be that the number of iterations reaches a preset number. Based on the solution objectives of each constraint function in the constraint function set, multiple rounds of iterative solution are performed on each variable in the constraint function set so that the position of each vertex in the first mesh model approaches or satisfies the solution objective through multiple rounds of iteration. When the iteration stops, it means that the state is close enough to satisfy all constraint conditions and the contact force has reached a stable or optimal state.

[0060] The force simulation method for human-computer interaction provided in this application involves modeling the target part of the target object and the interactive object separately to obtain a first mesh model of the target part and a second mesh model of the interactive object. When modeling the target part, this application model models each tissue based on its physical and chemical characteristics, thus obtaining a first mesh model that includes sub-mesh models of each tissue in the target part. This allows for more accurate capture of the structure, morphology, and positional relationships of each tissue in the target part, improving the model's accuracy. Furthermore, each sub-mesh model specifically includes a first sub-mesh model of the skin, as skin tissue possesses complex mechanical properties that affect the mechanical response of the arm. The first sub-mesh model plays a crucial role in the simulation. By establishing a sub-model of skin tissue, the mechanical properties of the skin can be simulated more accurately, thereby improving the accuracy of the simulation. Furthermore, the skin is the tissue that directly contacts the interactive object. Creating the first sub-mesh model helps to more accurately predict the mechanical response of the arm under different external forces (such as deformation, stress, and strain). This embodiment further determines a set of constraint functions. The variable of each constraint function in the set is the position of the corresponding vertex in the first mesh model. The objective of solving the constraint functions is to minimize the value of the corresponding constraint function. The determined set of constraint functions provides a set of equations related to the position of each vertex, and each equation is related to the actual physical meaning and constraint conditions. Therefore, by performing multiple rounds of iterative solutions on each variable in the constraint function set based on the solution objectives of each constraint function, the positions of each vertex in the first mesh model can be obtained. Thus, the positions of each vertex obtained by the solution are highly reliable. Furthermore, in order to solve the penetration problem, the constraint function set of this application embodiment includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first unit in the sub-mesh model of the skin and the second model. This solution can improve the robustness of the penetration processing by considering the contact force, so that the target object will not penetrate when it comes into contact with the robot. On the other hand, it retains the advantage of high degree of freedom of iteratively solving the vertex position based on the function set while keeping the overhead controllable.

[0061] Based on the above embodiments, as an optional embodiment, for each barrier constraint function, the barrier constraint function is used to determine the contact force between the first unit and the second unit according to the relationship between the shortest distance and the critical distance between the first unit and a second unit in the second model, and use it as the contact force between the first unit and the second model.

[0062] Since this function is used to determine the contact force, and the barrier constraint function in this application involves a critical distance, it should be understood that when the calculated minimum distance is greater than the critical distance, the contact force is 0, that is, the contact force does not exist. When it starts to be less than the critical distance, the contact force increases as the shortest distance decreases. The value of the barrier constraint function in this application can characterize the contact force, so the value of the barrier constraint function is also greater when the contact force is greater.

[0063] Contact force calculation is a core problem in physics engines and finite element analysis. When calculating contact forces, it is typically necessary to consider the normal and tangential forces (such as friction) at the contact surfaces. For mesh models, the contact state can be determined by examining the relative positions and penetration between vertices, edges, or faces, and the contact forces can be calculated accordingly. The calculation of contact forces between vertices and the mesh can be considered a special case of edge-to-edge or face-to-face contact. In this case, the contact state can be determined by examining the relative positions and penetration between the vertices and the mesh surface, and the contact forces can be calculated accordingly. Since the mesh surface consists of multiple edges and faces, it can be transformed into an edge-to-edge contact problem and a vertex-to-mesh contact problem by subdividing and discretizing the mesh.

[0064] The contact force constraint functions in this application include a first constraint function and a second constraint function. The first constraint function corresponds to the constraint relationship between an edge of the first sub-mesh model and an edge of the second mesh model, while the second constraint function corresponds to the constraint relationship between a vertex of the first sub-mesh model and a mesh in the second mesh model, representing the shortest distance between them. In some embodiments, if the first sub-mesh model includes a1 vertices and b1 edges, and the second mesh model includes b2 edges and c2 meshes, then the number of first constraint functions is b1 × b2, and the number of second constraint functions is a1 × c2.

[0065] Furthermore, the barrier constraint function in this application embodiment is used for: When the shortest distance between the first unit and the second unit is not less than the critical distance, the contact force between the first unit and the second unit is determined to be a preset value. When the shortest distance between the first unit and the second unit is less than the critical distance, the shortest distance is used as the input of a preset exponential function to obtain a weight. Based on the shortest distance and the critical distance, a first value is obtained to represent the difference between the shortest distance and the critical distance. The first value is weighted according to the weight to obtain the contact force between the first unit and the second unit, wherein the exponential function is a decreasing function.

[0066] In some embodiments, the barrier constraint function can be expressed by the following formula:

[0067] Where d is the preset critical distance, and D is the shortest distance between the first unit and the second unit; The first unit is an edge, and the second unit is an edge. D = min||( p 1+ β 1( p 2- p 1))- ( p 3+ β 2( p 4- p 3))||, where 0≤ β 1≤1,0≤ β 2≤1, p 1+ β 1( p 2- p 1) is any point on the first unit. p 3+ β 2( p 4- p 3) is any point on the second unit; The first unit is a vertex, the second unit is a mesh, and D = min|| p 1-( p 2+ β 1( p 3- p 2)+ β 2( p 4- p 3)) ||, β 1+ β 2≥1, β 1≥0, β 2≥0, p 2+ β 1( p 3- p 2)+ β 2( p 4- p 3) represents any point inside the second unit. a This is a preset constant.

[0068] The above formula is passed through This causes the barrier constraint function and its gradient to grow exponentially when the distance is close to 0 (penetration occurs)—the value of the function tends to positive infinity when it approaches 0. The advantage of this is that it can provide a sufficiently large equivalent contact force when the shortest distance is small, so that the contact between the target object and the robot will not penetrate, thus improving the robustness of penetration handling.

[0069] Based on the above embodiments, the constraint function set of this application embodiment further includes at least one tension constraint function. As the name suggests, the tension constraint function constrains the skin tension to limit excessive bending of the vertices of the skin sub-mesh model. Each tension constraint function in this application embodiment is used to determine the change in the angle formed between two edges with the same vertex in the first sub-mesh model, and the variable of the tension constraint function is the position of the common vertex of the two edges.

[0070] Each tension constraint function in this application embodiment corresponds to the constraint relationship of the included angle formed between two edges sharing the same vertex in the first sub-mesh model. The variable of the third constraint function is the position of the vertex shared by the two edges, and the solution objective is the difference between the included angle in each iteration and the included angle in the previous iteration.

[0071] Please see Figure 4 The figure illustrates, by way of example, the principle of the tension constraint function provided in this application embodiment. As shown in the figure, the line connecting vertices p1 and p2 is one edge of the first sub-mesh model, and the line connecting vertices p2 and p3 is another edge of the first sub-mesh model. The two edges share the same vertex p2. The calculation formula of the tension constraint function can be expressed as:

[0072] in, This represents the angle formed by the two sides in the previous iteration.

[0073] In the optimization process of the mesh model, this application further adds tension constraint functions to achieve the adjustment of the skin shape to meet tension requirements. Each tension constraint function in this application embodiment can be used to determine the change in the angle formed between two edges with the same vertex in the first sub-mesh model. This process can be regarded as a fine-tuning of the relationship between each vertex in the sub-mesh model of the skin, aiming to optimize the overall structure of the sub-mesh model of the skin by adjusting the position of the vertices.

[0074] The tension constraint function in this embodiment can quantify the impact of vertex movement on the local shape of the mesh. This impact is reflected not only in the numerical change of the included angle, but also in the stability and smoothness of the overall mesh structure. The variable of the tension constraint function is explicitly defined as the position of the common vertex of the two edges. This means that the tension constraint function indirectly controls the size of the included angle between the two edges by adjusting the coordinates of the common vertex, making the mesh optimization process more flexible and controllable. The objective of solving the tension constraint function is more clearly defined: it aims to calculate the difference between the included angle in each iteration and the included angle in the previous iteration. This difference reflects the degree of change in the local shape of the mesh during continuous iteration. By continuously reducing this difference, the ideal skin stretching shape can be gradually approximated, thereby achieving the goal of mesh optimization.

[0075] Based on the above embodiments, as an optional embodiment, the first mesh model further includes a sub-mesh model of the muscles of the target area (also referred to as the second sub-mesh model). As an important component of the first mesh model, the accuracy of the shape and structure of the second sub-mesh model is crucial to the visual and physical simulation effects of the overall model. Therefore, during the optimization process, this embodiment also involves processing the second sub-mesh model.

[0076] In the optimization of mesh models, especially when the mesh model contains intricate structures such as muscles, a single constraint function often fails to achieve the desired optimization effect. Therefore, this application introduces a richer set of constraint functions based on the constraint functions provided above, including at least one distance constraint function and at least one volume constraint function. These constraint functions work together on the second sub-mesh model to ensure that it retains its original shape to a certain extent after being compressed, thereby achieving more accurate and comprehensive optimization.

[0077] The distance constraint function is designed to ensure that the distance between the two vertices of a corresponding edge in the second sub-network model remains within a controllable range. This constraint is crucial for maintaining the continuity and smoothness of the muscles. Specifically, each distance constraint function uses the positions of the two vertices of a corresponding edge as variables and calculates the change in the distance between these two vertices in each iteration. By continuously adjusting the positions of these two vertices, this embodiment of the application can achieve fine-tuning of the local shape of the second sub-network model, thereby ensuring that the muscles appear more natural and realistic both visually and physically.

[0078] The volume constraint function controls the volume change of a corresponding mesh in the second sub-network model. This mesh contains at least four meshes, and its volume change reflects the expansion or contraction of muscles in three-dimensional space. Each volume constraint function calculates the change in mesh volume using the positions of each vertex of the corresponding mesh as variables. By adjusting the positions of these vertices, we can achieve precise control over muscle volume, thereby simulating more realistic muscle dynamics.

[0079] In this embodiment, the distance constraint function corresponds to the constraint relationship between the distances between two vertices of an edge in the second sub-mesh model. The variables of the distance constraint function are the positions of the two vertices of the corresponding edge; the objective is to find the change in the distance between the two vertices in each iteration. The two vertices of an edge are defined as follows: p 1 and p 2. Then the formula for calculating the distance constraint function corresponding to this edge can be expressed as:

[0080] in, This indicates the positions of the two vertices of the edge in the previous iteration.

[0081] In this embodiment, the volume constraint function corresponds to the volume constraint relationship of a polyhedron in the second sub-mesh model. The variables of the distance constraint function are the positions of each vertex of the corresponding polyhedron, and the objective is to find the change in volume of the polyhedron in each iteration. Taking a tetrahedron as an example, the four vertices of the tetrahedron are... p 1~ p 4. The formula for calculating the volume constraint function corresponding to the tetrahedron can be expressed as:

[0082] in, This represents the volume of the tetrahedron in the previous iteration.

[0083] Based on the above embodiments, as an optional embodiment, multiple rounds of iteration are performed on the constraint function set, which further includes: initializing the operator of each constraint function and the quality of each vertex in the first mesh model.

[0084] The constraint function operator in this application embodiment represents the constraint conditions of the constraint function. It is an auxiliary variable introduced when dealing with constrained optimization problems, used to describe the extreme behavior of the constraint function under constraints. The constraint function operator in this application embodiment is proportional to the constraint force of the constraint function. This means that the magnitude of the operator directly reflects the magnitude of the constraint force. From an energy perspective, the introduction of the operator helps maintain the energy balance of the system. By adjusting the magnitude of the constraint force, the operator ensures that the total energy of the system remains balanced while satisfying the constraint conditions. The operator has the physical meaning of characterizing the constraint force and maintaining energy balance, ensuring the physical reality of the system while satisfying the constraint conditions by adjusting the magnitude of the constraint force.

[0085] It is important to note that the mass of the vertices in the mesh model is a crucial factor affecting the dynamic simulation results. The mass of a vertex determines its acceleration, velocity, and position changes under the action of forces, thus influencing the dynamic structure of the entire model. Furthermore, initializing the mass of the vertices in the mesh model can help make the simulation results more physically realistic, thereby improving the accuracy and reliability of the simulation.

[0086] Within a time step, the constraint function is solved iteratively multiple times to bring the contact system between the target part and the robot close to a stable state. The main process of each iteration includes updating the changes in the operator, the changes in the vertex position, the operator value, and the vertex position value. In this embodiment, each iteration of the constraint function set is as follows: Figure 5 As shown, it includes: S201. For each constraint function, based on the value of each variable of the constraint function in the previous iteration, obtain the value of the constraint function in the current iteration and the gradient of each variable.

[0087] It is understandable that, for the first iteration, the value of each variable in the constraint function in the previous iteration is the initial position of that variable before the iteration.

[0088] When solving for the constraint function, embodiments of this application can substitute the values ​​of each variable involved in the constraint function in the previous iteration into the constraint function to obtain the value of the constraint function in the current iteration.

[0089] The gradient, or the direction of the fastest change in a constraint, is numerically equal to the derivative of the constraint function. Taking a potential barrier constraint function as an example, the formula for calculating the gradient of each variable in this constraint function is as follows:

[0090] It should be understood that when a constraint function involves multiple variables, when calculating the gradient of each variable, the most recently updated value of other variables in the constraint function can be used as a constant to calculate the partial derivative of that variable, thereby obtaining the gradient of that variable in the function.

[0091] S202. For each constraint function, based on the quality of all variables of the constraint function, the value of the constraint function in this iteration, and the gradient of each variable in the constraint function, obtain the change of the operator of the constraint function in this iteration.

[0092] After obtaining the gradient of each variable in the constraint function, this application, for each variable, obtains the constraint force of a unit mass of the variable under the constraint condition of the constraint function based on the variable's mass and its gradient. Specifically, embodiments of this application can calculate the quotient of the square of the magnitude of the gradient of the variable under the constraint function and the mass of the variable, as the constraint force of a unit mass of the variable under the constraint condition of the constraint function. i The magnitude of the constraint force under the constraint function. The calculation formula can be: =

[0093] in, Indicates that variable i is in the constraint function j gradient, Representing variables i The quality.

[0094] It should be noted that the gradient is a vector that describes the rate of change or slope of a function at a point. For multivariate functions, the gradient points in the direction in which the function value increases the most, and its magnitude represents the rate of change of the function value in that direction. The square of the magnitude mathematically represents the square of the vector length, reflecting the magnitude or strength of the vector. In this application, the square of the magnitude describes the strength or energy of a physical quantity. Therefore, the square of the magnitude of the gradient of a constraint function can be seen as the strength (magnitude) of the constraint force. Dividing the square of the magnitude of the gradient of the constraint function by the mass of the vertex can be seen as the strength of the constraint force per unit mass, which helps to more accurately simulate the motion behavior of an object under constraint conditions.

[0095] Furthermore, the magnitudes of the constraint forces per unit mass of all variables in the constraint function are summed under the constraint conditions of the constraint function. The summation result is then adjusted using preset adjustment parameters to obtain the comprehensive constraint force of the constraint function. Specifically, this can be calculated using the following formula: N j =G j +

[0096] in, N j Represents constraint functions j The comprehensive binding force, G j Represents constraint functions j Adjust the parameters.

[0097] This application adjusts the summation result by adjusting parameters in order to prevent complete minimization in each iteration, with only moderate adjustments made in each iteration.

[0098] In some embodiments, the adjustment parameter of a constraint function can be obtained by the quotient of the compliance degree of the constraint function and the square of the iteration step size. The compliance degree of a constraint function is an indicator used to measure the performance or degree of compliance of a function or set of functions in satisfying given constraints. In linear programming, constraints are usually expressed as linear inequalities or equality. Compliance degree can be defined as the degree to which a solution violates constraints (such as the number of violated constraints or the sum of the violations).

[0099] Furthermore, based on the value of the constraint function in this iteration and the comprehensive constraint force, the change of the constraint function operator in this iteration can be obtained. In some embodiments, the quotient of the value of the constraint function in this iteration and the comprehensive constraint force can be used as the change of the constraint function operator in this iteration.

[0100] S203. For each constraint function, based on the value of the operator of the constraint function in the previous iteration and the change in the current iteration, obtain the value of the operator of the constraint function in the current iteration.

[0101] It is understandable that by summing the value of the constraint function operator in the previous iteration with the change in the operator in the current iteration, the value of the constraint function operator in the current iteration can be obtained.

[0102] S204. For each vertex, take each constraint function of the vertex as a first constraint function, and obtain the gradient of the vertex per unit mass in the first constraint function based on the gradient of the vertex in the first constraint function and the mass of the vertex. Based on the value of the operator of each first constraint function in this iteration and the gradient of the vertex per unit mass in each first constraint function, obtain the change in the position of the vertex in this iteration.

[0103] Since a vertex can be used as a variable in multiple constraint functions, this application iterates through the set of constraint functions for each vertex in the first mesh model. If a constraint function's variable includes a specific position, then that constraint function is used as the first constraint function for that vertex.

[0104] In this embodiment, the gradient of a vertex with a unit mass in a first constraint function is obtained based on the gradient of the vertex in the first constraint function and the mass of the vertex. Next, based on the value of the operator of each first constraint function in this iteration and the gradient of the vertex with a unit mass in the first constraint function, the influence of the operator of each first constraint function on the position of the vertex in this iteration is obtained. Finally, the influence of all the operators of the first constraint functions on the position of the vertex in this iteration is accumulated to obtain the change in the position of the vertex in this iteration.

[0105] Specifically, the apex of the embodiments of this application i The change in position during this iteration can be calculated using the following formula:

[0106] in, Represents the first constraint function j The value of the operator in this iteration.

[0107] S205. Based on the change in the position of the vertex in this iteration and the value in the previous iteration, obtain the value of the vertex in this iteration.

[0108] It is understandable that by summing the value of the vertex's position in the previous iteration with the change in the vertex's position in the current iteration, we can obtain the value of the vertex's position in the current iteration.

[0109] It should be noted that the embodiments of this application can further provide more precise data for downstream robot tasks based on the vertex positions and constraint function operators obtained at the end of the iterative solution.

[0110] Taking the potential barrier constraint function as an example, the vertices of the skin's sub-mesh model are the points of action during human-computer interaction. The force on each vertex is calculated separately. This force increases the potential energy of the potential barrier constraint. Therefore, in the potential barrier constraint function, the force manifests as the gradient of constraint descent. For each pair of first and second elements, if the value of the potential barrier constraint is greater than 0, then a contact force exists. The force on each vertex is the sum of the contact forces exerted on it by all meshes. The calculation formula is:

[0111] Among them, D i It is the shortest distance between the first and second units of the i-th pair.

[0112] This application embodiment can also provide muscle-bone interaction forces to downstream robotic tasks. In the first mesh model, the skeleton is treated as a cylinder, and no position correction is performed on the constrained vertices. The interaction force between the muscle and the skeleton is represented by torque, applied by all vertices bound to the skeleton on the inner surface of the muscle. The force applied to each vertex is the descent gradient of all constraints acting at that point. For a single skeleton, the torque is calculated using the following formula:

[0113] in, r i Let be the position vector from the i-th vertex to the joint (the joint of the upper arm is the shoulder, and the joint of the lower arm is the elbow). C i,j This represents the j-th constraint function acting on the i-th vertex.

[0114] As can be seen from the above embodiments, solving the constraint functions changes the position of the vertices. For any two vertices with a constraint relationship, a change in the position of one vertex will change the effect of the constraint on the other vertex. Therefore, these two vertices must be solved sequentially. However, for two vertices without a constraint relationship, a change in the position of one vertex will not change the effect of the constraint on the other vertex. Therefore, in this embodiment, when performing multiple rounds of iterative solving on each variable in the constraint function set based on the solution objective of each constraint function, parallel solving can be considered. For example, for the first mesh model in this embodiment, the vertices inside the muscle sub-mesh model (excluding the vertices bound to the skin on the muscle surface) are only affected by distance constraints and volume constraints, while the vertices in the skin sub-mesh model are only affected by barrier constraints and tension constraints. The vertices in these two parts can be preferentially grouped together and solved in parallel.

[0115] In some embodiments of this application, determining the constraint relationship set further includes: A two-dimensional array is created to record whether there are constraints between any two vertices in the first grid model. Specifically, a two-dimensional array HashTable (array size n×n, where n is the number of vertices) is maintained as a hash table to record whether there are constraints between any two vertices in the first grid model. The initial value of the elements in the array is 0. When any constraint occurs between two vertices i and j (i>j), HashTable[i][j]=1 is updated.

[0116] The initial identifier set for each vertex in the first mesh model is obtained, and the initial identifier sets of all vertices include the same identifiers. In this embodiment, the identifier set available for configuring identifiers for each vertex is obtained. Before configuring an identifier for the first vertex, the initial identifier sets of all vertices include the same identifiers. For example, in this embodiment, the initial identifier set includes 10 identifiers, designated as identifiers 1 to 10. For each vertex in the first mesh model, when configuring an identifier for the vertex, a target identifier is assigned to the vertex based on the organization corresponding to each vertex whose identifier has been assigned in the identifier set of the vertex, so that the number of vertices assigned the target identifier in each organization is evenly distributed, and the target identifier is removed from the identifier set of vertices that have a constraint relationship with it.

[0117] When configuring identifiers for each vertex in the first mesh model, the vertices can be configured sequentially from the outside to the inside. When configuring any vertex, first determine how many identifiers are included in the current identifier set of that vertex. For each identifier, according to the organization corresponding to the vertex to which the identifier has been assigned, assign a target identifier to the vertex from the current identifier set so that the number of vertices assigned the target identifier in each organization is evenly distributed. This can maximize the number of parallels, improve iteration efficiency, and shorten the computation time.

[0118] In some embodiments of this application, configuring the identifiers of each vertex includes the following process: Select an unmarked vertex as the starting point; Assign an identifier to this vertex; Traverse all vertices with constraints on this vertex (its neighboring vertices): If a neighboring vertex has not yet been assigned an identifier, then assign it an identifier different from the current vertex.

[0119] If a neighboring vertex has already been assigned an identifier and has the same color as the current vertex, backtrack and try to assign a different identifier to the current vertex; Repeat the above process until all vertices have been assigned an identifier.

[0120] This application embodiment performs multiple rounds of iterative solution for each variable in the constraint function set, including: In each iteration, all variables with the same identifier in the constraint function set are solved in parallel.

[0121] In some embodiments, parallel solving can employ Gauss-Seidel iteration, which solves all vertices with the same identifier in parallel and uses the latest updated values ​​of other vertices during the iteration process, thereby improving the convergence speed of the iteration without causing conflicts.

[0122] The specific solution formula is as follows:

[0123] in, This represents the position of the j-th vertex of the i-th identifier after the (t+1)-th iteration. At this point, the previous... i The positions of the vertices identified by -1 have completed the (t+1)th iteration. The SolveConstraint uses these positions after the (t+1)th iteration. The remaining vertices that haven't undergone iterations use their positions from the tth iteration. The last parameter, n... m This represents the last vertex configured with the m-th identifier.

[0124] Please see Figure 6 The figure exemplarily illustrates a flowchart of a human-computer interaction force simulation method provided in another embodiment of this application, as shown in the figure, including: S301. Model the target part of the target object and the robot respectively to obtain a first mesh model of the target part and a second mesh model of the interactive object. The first mesh model includes sub-mesh models of each tissue in the target part, and each tissue includes skin and muscle. S302. Determine the set of constraint functions, which includes at least one barrier constraint function, at least one tension constraint function, at least one distance constraint function, and at least one volume constraint function. The barrier constraint function is used to determine the contact force between the first unit and the second unit based on the relationship between the shortest distance and the critical distance between the first unit and a second unit in the second model. The first unit is an edge, and the second unit is an edge; the first unit is a vertex, and the second unit is a mesh. The tension constraint function is used to determine the change in the angle formed by two edges with the same vertex in the sub-mesh model of the skin. The variable of the tension constraint function is the position of the common vertex of the two edges. The distance constraint function is used to determine the change in distance between two vertices of a corresponding edge in the sub-mesh model of the muscle. The variables of the distance constraint function are the positions of the two vertices of the corresponding edge. The volume constraint function is used to determine the change in volume of a corresponding polyhedron in the sub-mesh model of the muscle. The variables of the volume constraint function are the positions of each vertex of the corresponding polyhedron. S303. Initialization parameters: the operator of each constraint function and the mass of each vertex in the first mesh model; S304. Create a two-dimensional array, wherein the two-dimensional data is used to record whether there are constraint relationships between any two vertices in the first mesh model; S305. Obtain the initial identifier set of each vertex in the first mesh model. The initial identifier sets of all vertices include the same identifiers. For each vertex in the first mesh model, when configuring the identifier of the vertex, based on the organization corresponding to each vertex whose identifier has been assigned in the identifier set of the vertex, assign a target identifier to the vertex from the identifier set so that the number of vertices assigned the target identifier in each organization is evenly distributed, and remove the target identifier from the identifier set of vertices that have a constraint relationship with it. S306. Perform multiple iterations to solve for each variable in the constraint function set, wherein in each iteration, all variables with the same identifier in the constraint function set are solved in parallel: S3061. For each constraint function, based on the value of each variable of the constraint function in the previous iteration, obtain the value of the constraint function in the current iteration and the gradient of each variable in the constraint function; S3062. For each variable of the constraint function, based on the gradient of the variable in the constraint function and the mass of the variable, obtain the magnitude of the constraint force of the variable per unit mass under the constraint condition of the constraint function; S3063. According to the preset adjustment parameters of the constraint function, adjust the sum of the constraint forces corresponding to all variables per unit mass to obtain the comprehensive constraint force of the constraint function; S3064. Based on the value of the constraint function in this iteration and the comprehensive constraint force, obtain the change of the operator of the constraint function in this iteration; S3065. Based on the value of the operator of the constraint function in the previous iteration and the change in the current iteration, obtain the value of the operator of the constraint function in the current iteration; S3066. For each vertex, take each constraint function of the vertex as a first constraint function, and obtain the gradient of the vertex per unit mass in the first constraint function based on the gradient of the vertex in the first constraint function and the mass of the vertex. Based on the value of the operator of each first constraint function in this iteration and the gradient of the vertex per unit mass in each first constraint function, obtain the change in the position of the vertex in this iteration. S3067. Based on the change in the position of the vertex in this iteration and the value in the previous iteration, obtain the value of the vertex in this iteration; S307. Obtain the target value of each variable in the constraint function set to update the position of each vertex in the first mesh model.

[0125] The embodiments of this application have strong engineering application value. By constructing a set of constraint functions and performing multiple rounds of iterative solutions on each variable in the constraint function set based on the solution objectives of each constraint function, a high degree of freedom is provided for the simulation model. When applied to actual interactive scenarios, corresponding constraints can be added or modified according to requirements, making the control algorithm design conform to the scenario requirements. In addition, the corresponding parameters can be modified according to the accuracy requirements of the simulation. For example, when a closer contact simulation is required, the critical distance of the potential barrier constraint function can be reduced; when a more detailed force expression is required, a mesh with more vertices can be constructed.

[0126] The embodiments of this application can be used for simulation of auxiliary tasks such as sitting, standing, and transferring in human-computer interaction, helping to optimize robot control algorithms. Furthermore, it can be applied to scenarios where robots interact with other flexible bodies, such as robots grasping rags, clothing, and other items, achieving accurate simulation of robots in various home tasks. This constraint construction method can reflect the effect of forces at different contact points, and by adding refined constraints, simulation accuracy is improved, achieving non-penetrating interaction simulation.

[0127] This application provides a human-computer interactive force simulation device, such as... Figure 7 As shown, the human-computer interactive force simulation device may include: a modeling module 701, a function determination module 702, and an iterative solution module 703, wherein, Modeling module 701 is used to model the target part of the target object and the interactive object respectively, and obtain a first mesh model of the target part and a second mesh model of the interactive object. The first mesh model includes sub-mesh models of each tissue in the target part, and each tissue includes skin. The function determination module 702 is used to determine a set of constraint functions. The variable of each constraint function in the set of constraint functions is the position of the corresponding vertex in the first mesh model. The set of constraint functions includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first cell in the sub-mesh model of the skin and the second model. When the first cell is an edge, the variable of the barrier constraint function is the position of the two vertices of the first cell. When the first cell is a vertex, the variable of the barrier constraint function is the position of the first cell. The iterative solution module 703 is used to perform multiple rounds of iterative solution on each variable in the constraint function set based on the solution objective of each constraint function in the constraint function set, so as to obtain the objective value of each variable in the constraint function set and update the position of each vertex in the first mesh model. The solution objective of each constraint function is to minimize the value of the constraint function.

[0128] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0129] Based on the above embodiments, as an optional embodiment, for each barrier constraint function, the barrier constraint function is used to determine the contact force between the first unit and the second unit according to the relationship between the shortest distance and the critical distance between the first unit and a second unit in the second model, and use it as the contact force between the first unit and the second model; The shortest distance between the first unit and a second unit in the second model is determined based on the positions of the vertices corresponding to the first unit and the second unit, respectively. The first unit is an edge, and the second unit is an edge; The first unit is a vertex, and the second unit is a mesh.

[0130] Based on the above embodiments, as an optional embodiment, the barrier constraint function is used for: When the shortest distance between the first unit and the second unit is not less than the critical distance, the contact force between the first unit and the second unit is determined to be a preset value. When the shortest distance between the first unit and the second unit is less than the critical distance, the shortest distance is used as the input of a preset exponential function to obtain a weight. Based on the shortest distance and the critical distance, a first value is obtained to represent the difference between the shortest distance and the critical distance. The first value is weighted according to the weight to obtain the contact force between the first unit and the second unit, wherein the exponential function is a decreasing function.

[0131] Based on the above embodiments, as an optional embodiment, the constraint function set also includes at least one tension constraint function; Each tension constraint function is used to determine the change in the angle formed by two edges with the same vertex in the sub-mesh model of the skin, and the variable of the tension constraint function is the position of the common vertex of the two edges.

[0132] Based on the above embodiments, as an optional embodiment, each tissue also includes muscle; The set of constraint functions also includes at least one distance constraint function and at least one volume constraint function; Each distance constraint function is used to determine the change in distance between two vertices of a corresponding edge in the sub-mesh model of the muscle, and the variable of the distance constraint function is the position of the two vertices of the corresponding edge; Each volume constraint function is used to determine the change in volume of a corresponding polyhedron in the sub-mesh model of the muscle. The polyhedron includes at least 4 meshes, and the variables of the volume constraint function are the positions of each vertex of the corresponding polyhedron.

[0133] Based on the above embodiments, as an optional embodiment, the iterative solution module performs multiple rounds of iterative solution on the constraint function set, and before that: the operator of each constraint function and the mass of each vertex in the first mesh model are initialized, and the operator of each constraint function is used to represent the constraint condition of the constraint function; Each iteration of the iterative solution module on the constraint function set includes: For each constraint function, based on the value of each variable of the constraint function in the previous iteration, obtain the value of the constraint function in the current iteration and the gradient of each variable in the constraint function; For each constraint function, based on the quality of all variables of the constraint function, the value of the constraint function in this iteration, and the gradient of each variable in the constraint function, the change of the operator of the constraint function in this iteration is obtained. Based on the value of the operator of the constraint function in the previous iteration and the change in this iteration, the value of the operator of the constraint function in this iteration is obtained. For each vertex, each constraint function of the vertex is taken as a first constraint function. Based on the gradient of the vertex in the first constraint function and the mass of the vertex, the gradient of the vertex per unit mass in the first constraint function is obtained. Based on the value of the operator of each first constraint function in this iteration and the gradient of the vertex per unit mass in each first constraint function, the change in the position of the vertex in this iteration is obtained. Based on the change in the position of the vertex in this iteration and the value of the previous iteration, the value of the vertex in this iteration is obtained.

[0134] Based on the above embodiments, as an optional embodiment, for each constraint function, the change in the operator of the constraint function in this iteration is obtained according to the quality of all variables of the constraint function, the value of the constraint function in this iteration, and the gradient of each variable, including: For each variable of the constraint function, the magnitude of the constraint force per unit mass of the variable under the constraint function is obtained based on the gradient of the variable in the constraint function and the mass of the variable. Based on the preset adjustment parameters of the constraint function, the sum of the constraint forces corresponding to all variables per unit mass is adjusted to obtain the comprehensive constraint force of the constraint function; Based on the value of the constraint function in this iteration and the combined constraint force, the change of the operator of the constraint function in this iteration is obtained.

[0135] Based on the above embodiments, as an optional embodiment, the function determination module, in determining the constraint function set, is further configured to: Create a two-dimensional array, the two-dimensional data being used to record whether there are constraint relationships between any two vertices in the first mesh model; Obtain the initial identifier set for each vertex in the first mesh model. All vertices have the same identifier set in their initial identifier sets. For each vertex in the first mesh model, when configuring an identifier for the vertex, a target identifier is assigned to the vertex from the identifier set based on the organization corresponding to each vertex whose identifier has been assigned in the identifier set of the vertex, so that the number of vertices assigned the target identifier in each organization is evenly distributed, and the target identifier is removed from the identifier set of vertices that have a constraint relationship with it. The iterative solution module performs multiple rounds of iterative solutions for each variable in the constraint function set, including: In each iteration, all variables with the same identifier in the constraint function set are solved in parallel.

[0136] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of a force simulation method for human-computer interaction. Compared with related technologies, this method can achieve the following: by modeling the target part of the target object and the interactive object respectively, a first mesh model of the target part and a second mesh model of the interactive object are obtained. In this application embodiment, when modeling the target part, each tissue is modeled based on its physical and chemical characteristics. The resulting first mesh model includes sub-mesh models of each tissue in the target part, which can more accurately capture the structure, morphology, and positional relationships of each tissue in the target part, improving the accuracy of the model. Furthermore, each sub-mesh model specifically includes the first mesh model of the skin. The sub-mesh model addresses the complex mechanical properties of skin tissue, which play a crucial role in the mechanical response of the arm. By establishing a sub-model of the skin tissue, the mechanical characteristics of the skin can be simulated more accurately, thereby improving the accuracy of the simulation. Furthermore, the skin is the tissue in direct contact with the interactive object. Creating the first sub-mesh model helps to more accurately predict the mechanical response of the arm under different external forces (such as deformation, stress, and strain). This embodiment further defines a set of constraint functions, where the variable of each constraint function in the set is the position of the corresponding vertex in the first mesh model. The objective of solving the constraint functions is to minimize their values. The defined set of constraint functions provides a set of equations related to the positions of each vertex, and each equation is related to the actual physical meaning and constraint conditions. Therefore, by performing multiple rounds of iterative solutions on each variable in the constraint function set based on the solution objectives of each constraint function, the positions of each vertex in the first mesh model can be obtained. Thus, the positions of each vertex obtained by the solution are highly reliable. Furthermore, in order to solve the penetration problem, the constraint function set of this application embodiment includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first unit in the sub-mesh model of the skin and the second model. This solution can improve the robustness of the penetration processing by considering the contact force, so that the target object will not penetrate when it comes into contact with the robot. On the other hand, it retains the advantage of high degree of freedom of iteratively solving the vertex position based on the function set while keeping the overhead controllable.

[0137] In one alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0138] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0139] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, bus 4002 is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.

[0140] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and quality, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and quality, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0141] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0142] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.

[0143] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0144] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the illustrations or text descriptions.

[0145] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0146] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.

Claims

1. A human-computer interactive force simulation method, characterized in that, include: Modeling is performed on the target part of the target object and the robot to obtain a first mesh model of the target part and a second mesh model of the robot. The first mesh model includes sub-mesh models of each tissue in the target part, including skin. A set of constraint functions is determined, wherein the variable of each constraint function in the set of constraint functions is the position of the corresponding vertex in the first mesh model. The set of constraint functions includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first cell in the sub-mesh model of the skin and the second model. When the first cell is an edge, the variable of the barrier constraint function is the position of the two vertices of the first cell. When the first cell is a vertex, the variable of the barrier constraint function is the position of the first cell. Based on the solution objective of each constraint function in the constraint function set, multiple rounds of iterative solution are performed on each variable in the constraint function set to obtain the objective value of each variable in the constraint function set, so as to update the position of each vertex in the first mesh model. The solution objective of each constraint function is to minimize the value of the corresponding constraint function.

2. The method according to claim 1, characterized in that, For each barrier constraint function, the barrier constraint function is used to determine the contact force between the first unit and the second unit based on the relationship between the shortest distance and the critical distance between the first unit and a second unit in the second model, and use this as the contact force between the first unit and the second model; The shortest distance between the first unit and a second unit in the second model is determined based on the positions of the vertices corresponding to the first unit and the second unit, respectively. The first unit is an edge, and the second unit is an edge; The first unit is a vertex, and the second unit is a mesh.

3. The method according to claim 2, characterized in that, The barrier constraint function is used for: When the shortest distance between the first unit and the second unit is not less than the critical distance, the contact force between the first unit and the second unit is determined to be a preset value. When the shortest distance between the first unit and the second unit is less than the critical distance, the shortest distance is used as the input of a preset exponential function to obtain a weight. Based on the shortest distance and the critical distance, a first value is obtained to represent the difference between the shortest distance and the critical distance. The first value is weighted according to the weight to obtain the contact force between the first unit and the second unit, wherein the exponential function is a decreasing function.

4. The method according to claim 2, characterized in that, The set of constraint functions also includes at least one tension constraint function; Each tension constraint function is used to determine the change in the angle formed by two edges with the same vertex in the sub-mesh model of the skin, and the variable of the tension constraint function is the position of the common vertex of the two edges.

5. The method according to claim 4, characterized in that, The various tissues also include muscles; The set of constraint functions also includes at least one distance constraint function and at least one volume constraint function; Each distance constraint function is used to determine the change in distance between two vertices of a corresponding edge in the sub-mesh model of the muscle, and the variable of the distance constraint function is the position of the two vertices of the corresponding edge; Each volume constraint function is used to determine the change in volume of a corresponding polyhedron in the sub-mesh model of the muscle. The polyhedron includes at least 4 meshes, and the variables of the volume constraint function are the positions of each vertex of the corresponding polyhedron.

6. The method according to any one of claims 1-5, characterized in that, Before performing multiple rounds of iterative solution on the set of constraint functions, the process also includes: initializing the operator of each constraint function and the mass of each vertex in the first mesh model, wherein the operator of each constraint function is used to represent the constraint condition of the constraint function; Each iteration of the constraint function set includes: For each constraint function, based on the value of each variable of the constraint function in the previous iteration, obtain the value of the constraint function in the current iteration and the gradient of each variable in the constraint function; For each constraint function, based on the quality of all variables of the constraint function, the value of the constraint function in this iteration, and the gradient of each variable in the constraint function, the change of the operator of the constraint function in this iteration is obtained. Based on the value of the operator of the constraint function in the previous iteration and the change in this iteration, the value of the operator of the constraint function in this iteration is obtained. For each vertex, each constraint function of the vertex is taken as a first constraint function. Based on the gradient of the vertex in the first constraint function and the mass of the vertex, the gradient of the vertex per unit mass in the first constraint function is obtained. Based on the value of the operator of each first constraint function in this iteration and the gradient of the vertex per unit mass in each first constraint function, the change in the position of the vertex in this iteration is obtained. Based on the change in the position of the vertex in this iteration and the value of the previous iteration, the value of the vertex in this iteration is obtained.

7. The method according to claim 6, characterized in that, For each constraint function, based on the quality of all variables of the constraint function, the value of the constraint function in this iteration, and the gradient of each corresponding variable, the change in the operator of the constraint function in this iteration is obtained, including: For each variable of the constraint function, the magnitude of the constraint force per unit mass of the variable under the constraint function is obtained based on the gradient of the variable in the constraint function and the mass of the variable. Based on the preset adjustment parameters of the constraint function, the sum of the constraint forces corresponding to all variables per unit mass is adjusted to obtain the comprehensive constraint force of the constraint function; Based on the value of the constraint function in this iteration and the combined constraint force, the change of the operator of the constraint function in this iteration is obtained.

8. The method according to claim 1, characterized in that, The determination of the constraint function set also includes: Create a two-dimensional array, the two-dimensional data being used to record whether there are constraint relationships between any two vertices in the first mesh model; Obtain the initial identifier set for each vertex in the first mesh model. All vertices have the same identifier set in their initial identifier sets. For each vertex in the first mesh model, when configuring an identifier for the vertex, a target identifier is assigned to the vertex from the identifier set based on the organization corresponding to each vertex whose identifier has been assigned in the identifier set of the vertex, so that the number of vertices assigned the target identifier in each organization is evenly distributed, and the target identifier is removed from the identifier set of vertices that have a constraint relationship with it. The step of performing multiple rounds of iterative solutions for each variable in the constraint function set includes: In each iteration, all variables with the same identifier in the constraint function set are solved in parallel.

9. A human-computer interactive force simulation device, characterized in that, include: The modeling module is used to model the target part of the target object and the robot respectively, and obtain a first mesh model of the target part and a second mesh model of the robot. The first mesh model includes sub-mesh models of each tissue in the target part, and each tissue includes skin. A function determination module is used to determine a set of constraint functions. The variable of each constraint function in the set of constraint functions is the position of the corresponding vertex in the first mesh model. The set of constraint functions includes at least one barrier constraint function. Each barrier constraint function is used to determine the contact force between a first cell in the sub-mesh model of the skin and the second model. When the first cell is an edge, the variable of the barrier constraint function is the position of the two vertices of the first cell. When the first cell is a vertex, the variable of the barrier constraint function is the position of the first cell. The iterative solution module is used to perform multiple rounds of iterative solution on each variable in the constraint function set based on the solution objective of each constraint function in the constraint function set, so as to obtain the objective value of each variable in the constraint function set and update the position of each vertex in the first mesh model. The solution objective of each constraint function is to minimize the value of the constraint function.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the force simulation method for human-computer interaction as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the force simulation method for human-computer interaction as described in any one of claims 1-8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the force simulation method for human-computer interaction as described in any one of claims 1-8.