Distributed modeling system and method
Through the distributed modeling system, multiple modeling devices and servers are used for task distribution and parallel processing, which solves the problem of low efficiency of existing modeling and realizes an efficient modeling process.
Patent Information
- Application Number
- CN202210711526.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-06-22
AI Technical Summary
The existing modeling method has low modeling efficiency when large amounts of data are sent, and cannot complete the modeling task of multiple data in a short time.
A distributed modeling system is adopted to distribute tasks and process data among multiple modeling devices, and multiple modeling servers are used for parallel modeling to realize a distributed and synchronous modeling process.
It improves modeling efficiency, realizes multi-task parallel processing, reduces network communication serial consumption, and enhances the system's scalability and anti-interference ability.
Smart Images

Figure CN115063535B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and specifically relates to a distributed modeling system and method. Background Art
[0002] With the development of technology, modeling is now required in many scenarios. For example, access control devices need to control door opening based on collected facial models or fingerprint models. During the modeling process, large amounts of data are sometimes sent and need to be modeled in a short period of time. In such cases, modeling this large amount of data sequentially will result in low modeling efficiency. Summary of the Invention
[0003] The embodiments of the present application provide a distributed modeling system and method to solve the problem of low modeling efficiency in existing modeling methods, realize a distributed and synchronous modeling process, and improve modeling efficiency.
[0004] In a first aspect, an embodiment of the present application provides a distributed modeling system, the distributed modeling system comprising N modeling devices, each of the modeling devices being connected to other modeling devices, each of the modeling devices being provided with at least one modeling server, where N is greater than or equal to 2;
[0005] The first modeling device is used to send at least one modeling task to the second modeling device, the first modeling device is any modeling device among the N modeling devices, and the second modeling device is at least one of the N modeling devices except the first modeling device, and the modeling task includes the information to be modeled;
[0006] The second modeling device is used to send the modeling task to the modeling server set in itself and receive the modeling data returned by the modeling server, and send the modeling data to the first modeling device, wherein the modeling data is generated by the modeling server according to the information to be modeled in the modeling task.
[0007] In a second aspect, an embodiment of the present application provides a distributed modeling method, which is applied to the distributed modeling system described in the first aspect. The distributed modeling method includes:
[0008] The first modeling device receives multiple face images sent by the server;
[0009] If at least one second modeling device is in an idle state, the first modeling device distributes at least some of the multiple facial images to the at least one second modeling device, and receives modeling data fed back by the at least one second modeling device;
[0010] The idle state refers to not performing face authentication and not performing face modeling, and the modeling data is generated by the modeling server in the second modeling device itself by performing face modeling based on the face picture.
[0011] In a distributed modeling system provided by an embodiment of the present application, a first modeling device is used to send at least one modeling task to a second modeling device, the first modeling device is any modeling device among N modeling devices, and the second modeling device is at least one modeling device among the N modeling devices except the first modeling device, and the modeling task includes information to be modeled; the second modeling device is used to send the modeling task to a modeling server set in itself and receive modeling data returned by the modeling server, and send the modeling data to the first modeling device, wherein the modeling data is generated by the modeling server for modeling the information to be modeled in the modeling task; this enables the first modeling device to simultaneously distribute multiple modeling tasks to multiple second modeling devices for modeling, thereby improving the modeling computing power of the distributed modeling system, realizing distributed and synchronous modeling functions, and greatly accelerating the modeling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a schematic diagram of the structure of the distributed modeling system in an embodiment of the present application;
[0013] Figure 2 This is a schematic diagram of the workflow corresponding to the server adding module in an embodiment of the present application;
[0014] Figure 3 This is a schematic diagram of the workflow corresponding to the server deletion module in an embodiment of the present application;
[0015] Figure 4 This is a schematic diagram of the workflow corresponding to the task pool creation module in an embodiment of the present application;
[0016] Figure 5 This is a schematic diagram of the workflow corresponding to the task adding module in the embodiment of the present application;
[0017] Figure 6 This is a schematic diagram of the workflow corresponding to the task pool deletion module in an embodiment of the present application;
[0018] Figure 7 This is a schematic diagram of the workflow corresponding to the task processing process in the embodiment of the present application;
[0019] Figure 8 is a schematic diagram of another distributed modeling system in an embodiment of the present application;
[0020] Figure 9 It is a flow chart of the distributed modeling method in the embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0023] The distributed modeling system and method provided in the embodiments of the present application are described in detail below with reference to specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0024] Figure 1 A distributed modeling system provided by an embodiment of the present invention is shown, and the distributed modeling system includes:
[0025] N modeling devices, each of which is connected to other modeling devices, each of which is provided with at least one modeling server, and N is greater than or equal to 2;
[0026] The first modeling device is used to send at least one modeling task to the second modeling device, the first modeling device is any modeling device among the N modeling devices, and the second modeling device is at least one of the N modeling devices except the first modeling device, and the modeling task includes the information to be modeled;
[0027] The second modeling device is used to send the modeling task to the modeling server set in itself and receive the modeling data returned by the modeling server, and send the modeling data to the first modeling device, wherein the modeling data is generated by the modeling server by modeling the information to be modeled in the modeling task.
[0028] Optionally, the information to be modeled may include at least one of a face picture, a fingerprint, and a voiceprint. For example, as an example, assuming that the information to be modeled is a face picture, the modeling device may be a face recognition card reader.
[0029] Specifically, the value of N may be determined according to actual conditions. For example, N may be 8, which means there are 8 modeling devices in total. In this case, each modeling device establishes a communication connection with the other 7 modeling devices.
[0030] Furthermore, at least one modeling server can be provided in each modeling device, for example, one modeling server or two or more modeling servers. Specifically, providing multiple modeling servers in a modeling device allows the device to support multi-tasking concurrency, possessing excellent scalability and anti-interference capabilities, effectively improving modeling efficiency, reducing the risk of network fluctuations, and reducing serial network communication consumption when modeling work is performed serially.
[0031] Specifically, the first modeling device can be any modeling device among the N modeling devices, and the second modeling device can be at least one modeling device among the N modeling devices other than the first modeling device. For example, if the N modeling devices include four modeling devices A, B, C, and D, and the first modeling device is A, the second modeling devices can be B, C, and D; if the first modeling device is B, the second modeling devices can be A, C, and D. This allows any modeling device to distribute the modeling task to other modeling devices after receiving it.
[0032] Specifically, the first modeling device can send at least one modeling task to the second modeling device. At this time, the second modeling device can send the received modeling task to the modeling server in itself; the modeling server in the second modeling device can model and generate modeling data based on the information to be modeled in the modeling task, and return the modeling data to the second modeling device; the second modeling device sends the modeling data to the first modeling device, realizing the distribution processing process of the modeling task; of course, when the modeling server models according to the information to be modeled, it can model according to the information to be modeled through a pre-set modeling algorithm.
[0033] In one implementation, the first modeling device is further configured to send the modeling task to be processed to the modeling server provided in the first modeling device, and receive modeling data corresponding to the modeling task to be processed returned by the modeling server.
[0034] Specifically, since at least one modeling server is provided in the first modeling device, the first modeling device itself can also process the modeling task, that is, the first modeling device can perform modeling according to the information to be modeled through the modeling server provided in itself, thereby realizing the modeling function of the first modeling device itself, which enables N modeling devices to perform modeling processing on the modeling tasks at the same time, thereby realizing the parallel processing process of multiple modeling tasks.
[0035] It can be seen that the first modeling device has two functions. One is to process modeling tasks through its own modeling server to further improve modeling efficiency; the other is to dispatch modeling tasks to the second modeling device and receive modeling data after the second modeling device executes the modeling tasks, thereby realizing concurrent processing of modeling tasks in the distributed modeling system and unified aggregation of all modeling data.
[0036] In addition, in one implementation, the distributed modeling system also includes: a server adding module, used to add a first preset number of the modeling servers in the first modeling device, and to add a second preset number of the modeling servers in the second modeling device when the second modeling device has the same modeling function as the first modeling device.
[0037] Specifically, as an example, when detecting whether the second modeling device has the same modeling function as the first modeling device, it can be detected that when a modeling server is added to the second modeling device, whether the modeling data of the second modeling device and the first modeling device for the same information to be modeled are consistent. If they are consistent, it is determined that the second modeling device has the same modeling function as the first modeling device.
[0038] Specifically, when the first modeling device is started, due to its own computing power, the local modeling server will be added first, that is, the modeling server will be added on the first modeling device first, and the second modeling device can be added automatically (for example, automatically added when the second modeling device is online) or manually.
[0039] In the process of adding modules to the server, such as Figure 2 As shown, it is possible to first detect whether a modeling server (i.e., a local modeling server) is to be added to the first modeling device; if a modeling server is to be added to the first modeling device, a corresponding number (a first preset number) of modeling servers can be added to the first modeling device. For example, if it is preset that only one modeling server can be added to the first modeling device, the first preset number is 1, i.e., one modeling server is added to the first modeling device; if it is preset that two modeling servers can be added to the first modeling device, the first preset number is 2. This allows the local modeling server to re-model, thereby improving modeling reliability through the local modeling server when a modeling task of the modeling server in the second modeling device fails.
[0040] If a modeling server is added to the second modeling device, it is detected whether the second modeling device has the same modeling function as the first modeling device; at this time, it can be detected whether there is information to be modeled in the second modeling device. If not, wait for 10 seconds and continue to detect. If there is information to be modeled in the second modeling device, modeling is performed and it is detected whether the modeling is successful; if the modeling is successful, the modeling algorithm of the modeling server to be added to the second modeling device can be detected through the modeling data to determine whether it is consistent with the modeling algorithm (local algorithm) of the first modeling device. If they are consistent, the server adding module can establish a communication connection with the second modeling device and add a second preset number of modeling servers in the second modeling device.
[0041] Furthermore, the second preset number can be one or more than two. For example, if it is pre-set that only two modeling servers can be added to the second modeling device, the second preset number can be two, i.e., two modeling servers are added to the second modeling device to improve modeling efficiency while reducing the risk of network fluctuations. Of course, the second preset number can be set according to actual conditions to ensure that multiple modeling tasks can be processed more quickly.
[0042] In the process of adding a modeling server, by adding a modeling server when it is detected that the second modeling device has the same modeling function as the first modeling device, it is ensured that the modeling data of the first modeling device and the second modeling device for the same information to be modeled are the same, and the modeling consistency of the same information to be modeled by different devices is ensured; in addition, by supporting the addition of modeling servers during the modeling process, the risk of network fluctuations can be reduced in situations such as device disconnection and network instability.
[0043] In addition, in one implementation, the distributed modeling system further includes: a server deletion module, configured to send a thread termination signal to the modeling server to be deleted in the modeling device, and to delete the modeling server to be deleted after determining that the thread of the modeling server to be deleted has terminated, wherein the thread termination signal is used to control the termination of the thread of the modeling server to be deleted after the current modeling task of the modeling server to be deleted is completed.
[0044] Specifically, in the process of server deletion module, see Figure 3 , you can first find the modeling server to be deleted and send a thread termination signal to it. Then, after the modeling task of the modeling server to be deleted is completed, the thread of the modeling server to be deleted is terminated and the information of the modeling server to be deleted is deleted. This enables dynamic support for the deletion of modeling servers during the modeling process, avoiding waste of resources.
[0045] In addition, in one implementation, the distributed modeling system further includes:
[0046] A task pool creation module is used to create at least one task pool in the modeling device and set the priority corresponding to each task pool and the maximum number of modeling tasks that can be stored, wherein the modeling tasks in the task pool are sent to the modeling server set in the modeling device in sequence according to the priority order of the task pool;
[0047] The task adding module is used to add a modeling task to the task pool when the number of modeling tasks stored in the task pool does not reach the maximum number corresponding to the task pool.
[0048] Specifically, the modeling task is to perform modeling based on the information to be modeled and obtain modeling data corresponding to the information to be modeled.
[0049] Specifically, during the working process of the task pool creation module, such as Figure 4 As shown, at least one task pool can be created in the modeling device, which is used to store modeling tasks, and the priority corresponding to each task pool and the maximum number of modeling tasks that can be stored are set, and all the created task pools are sorted from high to low priority. At this time, the modeling tasks in the task pool with high priority are processed in the first order, that is, the modeling tasks in the task pool with high priority can be sent to the modeling server first.
[0050] Specifically, the number of the at least one task pool may be one or more.
[0051] In this way, by supporting the creation of multiple task pools, high-priority task pools prioritize modeling tasks, ensuring the modeling efficiency of high-demand modeling tasks. For example, assume that the priority of task pool A is higher than that of task pool B. Currently, a large number of personnel are required to perform modeling and multi-person face recognition modeling. The timeliness requirements for face recognition will be much higher, that is, the priority of the multi-person face recognition modeling task is higher than the priority of the large number of personnel. At this time, the large number of personnel modeling tasks can be stored in task pool A, and the multi-person face recognition modeling tasks can be stored in task pool B. Since the modeling tasks in the high-priority task pool are processed first, the multi-person face recognition modeling tasks in task pool B can be executed first, that is, multi-person face recognition modeling is prioritized, thereby ensuring the modeling efficiency of high-demand modeling tasks.
[0052] In addition, during the work of the task adding module, if Figure 5As shown, at the beginning of adding a new modeling task, it is possible to detect whether the number of modeling tasks stored in the task pool has reached the maximum number corresponding to the task pool; if not, the modeling task is directly added to the task pool; if it has been reached, due to memory limitations, it is necessary to wait until the number of modeling tasks in the task pool drops to less than the maximum number, that is, until the task pool releases capacity, before the modeling task can be added to the task pool, thereby realizing the control of the task pool capacity and thus realizing the management of the modeling tasks of the modeling server.
[0053] In addition, in one implementation, the distributed modeling system further includes: a task pool deletion module, configured to delete any task pool when the number of modeling tasks stored in the task pool is zero.
[0054] Specifically, during the work process of the task pool deletion module, such as Figure 6 As shown, all unexecuted modeling tasks in the task pool to be deleted can be deleted first, and the number of modeling tasks stored in the task pool can be checked to see if it is zero. If it is zero, the task pool can be deleted. If it is not zero, 100ms can be waited for, and then the steps of deleting all unexecuted modeling tasks in the task pool to be deleted can be continued, thereby releasing the memory resources in the modeling server.
[0055] In addition, in one implementation, the second modeling device is further configured to feed back the modeling data corresponding to the successfully completed modeling tasks to the first modeling device in sequence according to a preset order.
[0056] Specifically, after successful modeling, the modeling server in the second modeling device can feed back the modeling data corresponding to the successful modeling task to the first modeling device in sequence according to a preset order, thereby realizing the sequential return of the modeling data.
[0057] In addition, optionally, a task processing module can be provided in both the first modeling device and the second modeling device. The task processing module can obtain the modeling tasks to be processed in sequence according to a preset order, and send the obtained modeling tasks to be processed or the information to be modeled in the modeling tasks to the modeling server.
[0058] It should be noted that before sending the to-be-modeled information corresponding to the modeling task to the modeling server, the task processing module may also first detect whether the modeling task has been obtained. If the modeling task has been obtained, the to-be-modeled information corresponding to the modeling task will be sent to the modeling server. If the modeling task has not been obtained, the modeling server will be controlled to enter a thread dormant state. Of course, if the modeling server receives a thread termination signal, it will exit the modeling task.
[0059] Specifically, such as Figure 7As shown, the entire working process can be as follows: first, detect whether the modeling server receives a thread termination signal; if the modeling server receives a thread termination signal, exit the modeling task; if the modeling server does not receive a thread termination signal, detect whether the next modeling task is obtained; if the modeling server does not obtain the next modeling task, control the modeling server to enter a thread dormant state; if the modeling server obtains the next modeling task, send the to-be-modeled information corresponding to the modeling task to the modeling server, and save the modeling data after the modeling is successful; then, if the modeling data is set to be returned, the modeling server feeds back the modeling data corresponding to the successfully modeled modeling task to the first modeling device, and deletes the record information of the modeling data.
[0060] Of course, it should be noted that if there are multiple modeling data in the modeling server, the modeling data will be fed back to the first modeling device in an orderly manner, thereby realizing the aggregation of the modeling data.
[0061] In one implementation, the second modeling device is further configured to feed back modeling tasks of the modeling server in itself that fail to model and time out to the first modeling device;
[0062] The first modeling device is further configured to process the modeling tasks of modeling failure and modeling timeout through the modeling server provided by the first modeling device.
[0063] Specifically, the modeling server in the second modeling device may experience modeling failure or modeling timeout. Modeling timeout means that the time for the modeling server to generate modeling data exceeds the preset time. At this time, the second modeling device can feedback the modeling task of modeling failure or modeling timeout to the first modeling device; the first modeling device can re-process the modeling task of modeling failure or modeling timeout, realizing the re-modeling process of modeling tasks of modeling failure or modeling timeout, and ensuring the reliability of the modeling task.
[0064] Below through Figure 8 A distributed modeling system in one embodiment of the present application is described.
[0065] like Figure 8 As shown, in this distributed modeling system, when adding a modeling server, a consistency comparison of the modeling server algorithm is required. After confirming that the modeling algorithm of the modeling server is consistent with that of the modeling server in the first modeling device, the newly added modeling server is started. In particular, at least one modeling server can be set in each of the first modeling device and the second modeling device.
[0066] In addition, the system supports dynamic modeling servers, that is, it supports adding or removing modeling servers during the modeling process to cope with situations such as modeling device disconnection and network instability. When removing modeling servers, the system can wait for the corresponding modeling server to complete its current task and terminate and reclaim the thread.
[0067] Of course, it is also possible to implement re-modeling by the modeling server of the first modeling device after the modeling task fails. Since the modeling server in the first modeling device (local modeling server) is the most reliable, the modeling server in the first modeling device will retry modeling for tasks that fail in modeling by other servers.
[0068] In addition, the system supports multiple task pools, that is, multiple task pools can be created in the system, and modeling tasks can be added to the corresponding task pool, and modeling data of completed tasks in the corresponding task pool can be obtained.
[0069] The system can also delete all modeling tasks that have not been started in the corresponding task pool, and delete the corresponding task pool after all ongoing modeling tasks are completed.
[0070] In addition, you can also set the priority of the task pool, and the modeling tasks in the high-priority task pool will be processed first.
[0071] In addition, the system also supports the sequential return of modeling data, that is, all modeling servers can return modeling data in order after completing the modeling task, thereby realizing the aggregation of modeling data.
[0072] In addition, the system also supports task pool capacity control. Since the memory of the modeling device is limited, when the task pool capacity is full, no new modeling tasks can be added. Only after some modeling tasks in the task pool are completed and the capacity is released can new modeling tasks be added to the task pool.
[0073] In addition, a single modeling device supports multiple concurrent tasks. For example, a single second modeling device can support the creation of two modeling servers. Even if the modeling work is serial, it can reduce the serial time consumption of network communication and effectively deal with problems such as network fluctuations.
[0074] It should be noted that the construction of the distributed modeling environment in this application is not limited to the first modeling device and the second modeling device, and can be subsequently expanded to the concurrent processing of modeling tasks between each modeling device and the platform, so that all machines with modeling capabilities in the area can share modeling computing power.
[0075] In addition, if Figure 9 FIG. 1 is a flowchart of the steps of the distributed modeling method in an embodiment of the present application. The distributed modeling method can be applied to the distributed modeling system in the above embodiment. The method includes the following steps:
[0076] Step 901: A first modeling device receives multiple face images sent by a server.
[0077] Specifically, in a face recognition scenario, the server may send multiple face images to the first modeling device.
[0078] For example, a campus has four access control points, each equipped with a modeling device that controls access by recognizing faces. Assume the modeling devices are A, B, C, and D, and the server needs to send a large number of facial images to the campus. In this case, the server can send multiple facial images to A, B, C, or D. Therefore, the first modeling device can be A, B, C, or D.
[0079] For another example, in a central face library modeling scenario, the server needs to model the face. At this time, the server can send multiple face images to any modeling device, that is, the first modeling device can be any modeling device.
[0080] Step 902: If the second modeling device is in an idle state, the first modeling device distributes at least some of the multiple face images to the second modeling device, and receives modeling data fed back by the second modeling device.
[0081] The idle state refers to not performing face authentication and not performing face modeling, and the modeling data is generated by the modeling server in the second modeling device itself by performing face modeling based on the face picture.
[0082] Specifically, each modeling device has both face authentication and face modeling functions.
[0083] If the second modeling device is not currently performing face authentication and face modeling, the first modeling device can distribute at least part of the multiple face pictures to the second modeling device, and the modeling server in the second modeling device will perform modeling based on the face pictures and generate modeling data, and the second modeling device will feed the modeling data back to the first modeling device, thereby realizing the aggregation of the modeling data.
[0084] For example, continuing with the above example, assuming that the first modeling device is A and the second modeling devices include B, C and D, then modeling device A can distribute facial images to B, C and D, and modeling devices B, C and D use their own modeling servers to perform modeling based on the distributed facial images, thereby realizing a concurrent modeling process of facial images.
[0085] In one implementation, when the first modeling device distributes at least some of the multiple facial images to the second modeling device, the following steps may be included:
[0086] If the first modeling device is performing face authentication, it prohibits face modeling through its own modeling server and distributes the multiple face images to the second modeling device; or
[0087] If the first modeling device is performing face authentication, it suspends face authentication and performs face modeling on some face pictures through its own modeling server, and distributes the remaining face pictures except the said part of face pictures in the multiple face pictures to the second modeling device.
[0088] Specifically, if the first modeling device is performing face authentication when receiving multiple face images sent by the server, face modeling can be prohibited, and all received face images can be distributed to the second modeling device, which then models the face images. This ensures that the first modeling device can perform face authentication normally while ensuring the efficiency of face image modeling.
[0089] Of course, if the first modeling device is performing face authentication when receiving multiple face pictures sent by the server, it can also temporarily perform face authentication first, and then model some of the face pictures through its own modeling server, and distribute the remaining face pictures except for some of the face pictures to the second modeling device, and the second modeling device will model the received face pictures, thereby realizing concurrent processing of face pictures by the first modeling device and the second modeling device, and improving modeling efficiency.
[0090] Furthermore, in one implementation, when the first modeling device distributes at least some of the multiple facial images to the second modeling device, the following steps may be included:
[0091] If the first modeling device is performing face authentication, determining the time required for the first modeling device to complete the face authentication;
[0092] If the time is less than the preset time value, after completing the face authentication, face modeling is performed on part of the face pictures through the modeling server in the self-modeling device, and the remaining face pictures except the part of the face pictures in the multiple face pictures are distributed to the second modeling device;
[0093] If the time is greater than the preset time value, continue with the face authentication and distribute the multiple face pictures to the second modeling device.
[0094] Specifically, if the first modeling device is performing facial recognition when receiving multiple facial images sent by the server, the time required for the first modeling device to complete facial recognition can be predicted. For example, if it is rush hour, there are many people who need facial recognition, and the first modeling device will need to complete facial recognition for a longer time; if it is during working hours, there are fewer people entering and leaving the office and fewer people need to perform facial recognition, and the first modeling device will need to complete facial recognition for a shorter time.
[0095] The preset time value can be set according to actual conditions, for example, it can be set to 10 minutes.
[0096] If the time required for the first modeling device to complete face recognition is less than the preset time value, it can be considered that the face recognition process has little impact on the face modeling process, and face recognition can continue. After completing face recognition, face modeling is performed on part of the face pictures through its own modeling server, and the remaining face pictures are distributed to the second modeling device, which models the received face pictures, thereby realizing the concurrent processing of face pictures by the first modeling device and the second modeling device without affecting face recognition.
[0097] If the time required for the first modeling device to complete face recognition is greater than the preset time value, it can be considered that the face recognition process has a greater impact on the face modeling process. The first modeling device can continue to perform face recognition and distribute all face images to the second modeling device, and the second modeling device will model the received face images, thereby achieving the goal of distributing the modeling task to the second modeling device for processing without affecting face recognition, thereby ensuring the modeling efficiency of face images.
[0098] In this way, the first modeling device receives multiple facial images sent by the server, and when the second modeling device is in an idle state, the first modeling device distributes at least part of the multiple facial images to the second modeling device, and receives modeling data fed back by at least one second modeling device, so that the modeling process of facial images can be accelerated through multiple second modeling devices, thereby improving the efficiency of facial image modeling.
[0099] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0101] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A distributed modeling system, characterized in that: The distributed modeling system includes N modeling devices, each of which is connected to other modeling devices, each of which is provided with at least one modeling server, and N is greater than or equal to 2; The first modeling device is used to send at least one modeling task to the second modeling device, the first modeling device is any modeling device among the N modeling devices, and the second modeling device is at least one of the N modeling devices except the first modeling device, and the modeling task includes information to be modeled; The second modeling device is used to send the modeling task to the modeling server set in itself and receive the modeling data returned by the modeling server, and send the modeling data to the first modeling device, wherein the modeling data is generated by the modeling server according to the information to be modeled in the modeling task.
2. The distributed modeling system according to claim 1, characterized in that The first modeling device is further configured to send the modeling task to be processed to the modeling server provided in the first modeling device, and receive modeling data corresponding to the modeling task to be processed returned by the modeling server.
3. The distributed modeling system according to claim 1, characterized in that: The distributed modeling system further includes: The server adding module is used to add a first preset number of the modeling servers in the first modeling device, and to add a second preset number of the modeling servers in the second modeling device when the second modeling device has the same modeling function as the first modeling device.
4. The distributed modeling system according to claim 1, wherein: The distributed modeling system further includes: The server deletion module is configured to send a thread termination signal to the modeling server to be deleted in the modeling device, and delete the modeling server to be deleted after determining that the thread of the modeling server to be deleted is terminated, wherein the thread termination signal is used to control the termination of the thread of the modeling server to be deleted after the current modeling task of the modeling server to be deleted is completed.
5. The distributed modeling system according to claim 1, wherein: The distributed modeling system further includes: A task pool creation module is used to create at least one task pool in the modeling device and set the priority corresponding to each task pool and the maximum number of modeling tasks that can be stored, wherein the modeling tasks in the task pool are sent to the modeling server set in the modeling device in sequence according to the priority order of the task pool; The task adding module is used to add a modeling task to the task pool when the number of modeling tasks stored in the task pool does not reach the maximum number corresponding to the task pool.
6. The distributed modeling system according to claim 5, characterized in that: The distributed modeling system further includes: The task pool deletion module is used to delete the task pool when the number of modeling tasks stored in any task pool is zero.
7. The distributed modeling system according to claim 1, characterized in that: The second modeling device is further configured to feed back modeling data corresponding to successfully modeled modeling tasks to the first modeling device in sequence according to a preset order.
8. The distributed modeling system according to claim 1, wherein: The second modeling device is further configured to feed back modeling tasks of the modeling server in itself that have failed modeling or have timed out to the first modeling device; The first modeling device is further configured to process the modeling tasks of modeling failure and modeling timeout through the modeling server provided by the first modeling device.
9. The distributed modeling system according to any one of claims 1 to 8, characterized in that: The information to be modeled includes at least one of a face picture, a fingerprint, and a voiceprint.
10. A distributed modeling method, applied to the distributed modeling system according to any one of claims 1 to 9, characterized in that: The distributed modeling method comprises: The first modeling device receives multiple face images sent by the server; If the second modeling device is in an idle state, the first modeling device distributes at least some of the multiple facial images to the second modeling device, and receives modeling data fed back by the second modeling device; The idle state refers to not performing face authentication and not performing face modeling, and the modeling data is generated by the modeling server in the second modeling device itself by performing face modeling based on the face picture.
11. The distributed modeling method according to claim 10, characterized in that: The first modeling device distributes at least some of the multiple face images to the second modeling device, including: If the first modeling device is performing face authentication, it prohibits face modeling through its own modeling server and distributes the multiple face images to the second modeling device; or If the first modeling device is performing face authentication, it suspends face authentication and performs face modeling on some face pictures through its own modeling server, and distributes the remaining face pictures except the said part of face pictures in the multiple face pictures to the second modeling device.
12. The distributed modeling method according to claim 10, characterized in that: The first modeling device distributes at least some of the multiple face images to the second modeling device, including: If the first modeling device is performing face authentication, determining the time required for the first modeling device to complete the face authentication; If the time is less than the preset time value, after completing the face authentication, face modeling is performed on part of the face pictures through the modeling server in the self-modeling device, and the remaining face pictures except the part of the face pictures in the multiple face pictures are distributed to the second modeling device; If the time is greater than the preset time value, continue with the face authentication and distribute the multiple face pictures to the second modeling device.