Data processing method, apparatus and electronic device
Patent Information
- Application Number
- CN202211104236.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-09-09
AI Technical Summary
相关技术中,在大多情况下,需要人工操作DCC软件对这些数据逐一处理,操作繁琐且效率较低;还可以编写插件,将插件安装至DCC软件中,通过插件读取外部软件中的数据并进行处理,该方式增加了用户的学习使用成本,需要对插件进行额外的配置,操作依然比较复杂,同时还会增加DCC软件的复杂性,影响软件的使用性能
[0009]上述数据处理方法、装置和电子设备,接收数据处理指令,基于数据处理指令确定待处理的目标数据、数据处理方式以及软件版本信息;其中,数据处理方式包括数据批处理操作和/或数据写入;软件版本信息指示:用于处理目标数据的目标软件的软件类型和软件版本;确认软件版本信息指示的目标软件启动;基于数据处理方式和目标软件的软件类型,确定与目标软件进行通信的目标通信方式;通过目标通信方式,控制目标软件按照数据处理方式对目标数据进行处理,得到处理完成的目标数据。该方式通过外部软件与目标软件交互实现大量数据的处理,数据处理效率较高;同时,根据数据处理方式和目标软件的软件类型,确定外部软件与目标软件进行通信的通信方式,使得外部软件与目标软件适用较为合理的通信方式进行通信,无需额外安装插件,降低了软件的复杂性,保障了软件的使用性能。
Smart Images

Figure CN115629814B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a data processing method, apparatus, and electronic device. Background Technology
[0002] Digital Content Creation (DCC) software is a general term for 3D animation production software, typically including 3ds Max, Maya, and MoBu. In some applications, DCC software needs to process large amounts of data, such as performing format conversions, content transformations, and data import. In most cases, this requires manual operation of the DCC software to process this data one by one, which is tedious and inefficient. Alternatively, plugins can be written and installed into the DCC software to read and process data from external software. However, this increases the learning curve for users, requires additional plugin configuration, and remains complex, further increasing the complexity of the DCC software and impacting its performance. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a data processing method, apparatus and electronic device to improve the data processing efficiency of DCC software when processing large amounts of data; at the same time, it can read and process data without the need for additional plug-ins, making operation simple and convenient and ensuring the performance of the software.
[0004] In a first aspect, embodiments of the present invention provide a data processing method, which includes receiving a data processing instruction, determining the target data to be processed, the data processing method, and software version information based on the data processing instruction; wherein the data processing method includes data batch processing operations and / or data writing; the software version information indicates the software type and software version of the target software used to process the target data; confirming that the target software indicated by the software version information is started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; and controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data.
[0005] Secondly, embodiments of the present invention provide a data processing apparatus, comprising: a first information determination module, configured to receive a data processing instruction and determine, based on the data processing instruction, target data to be processed, a data processing method, and software version information; wherein the data processing method includes data batch processing operation and / or data writing; the software version information indicates the software type and software version of the target software used to process the target data; a second information determination module, configured to confirm that the target software indicated by the software version information has started; a communication method determination module, configured to determine, based on the data processing method and the software type of the target software, a target communication method for communicating with the target software; and a data processing module, configured to control the target software to process the target data according to the data processing method through the target communication method, thereby obtaining the processed target data.
[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described data processing method.
[0007] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described data processing method.
[0008] The embodiments of the present invention bring the following beneficial effects:
[0009] The aforementioned data processing method, apparatus, and electronic device receive data processing instructions and determine the target data to be processed, the data processing method, and software version information based on these instructions. The data processing method includes batch data processing and / or data writing. The software version information indicates the software type and version of the target software used to process the target data. The system confirms the startup of the target software indicated by the software version information. Based on the data processing method and the software type of the target software, it determines the target communication method for communicating with the target software. Through the target communication method, it controls the target software to process the target data according to the data processing method, obtaining the processed target data. This method achieves the processing of large amounts of data through interaction between external software and the target software, resulting in high data processing efficiency. Simultaneously, by determining the communication method between the external software and the target software based on the data processing method and the software type of the target software, it ensures that the external software and the target software use a more appropriate communication method, eliminating the need for additional plugins, reducing software complexity, and guaranteeing software performance.
[0010] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0011] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1 A flowchart of a data processing method provided in an embodiment of the present invention;
[0014] Figure 2 This is a schematic diagram illustrating how DCC software processes data using a batch processing method, as provided in an embodiment of the present invention.
[0015] Figure 3 This is a schematic diagram illustrating how DCC software processes data using a data writing method, as provided in an embodiment of the present invention.
[0016] Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present invention;
[0017] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The following section first introduces the terminology used in the embodiments of this application:
[0020] 1) 3D Studio Max
[0021] 3ds Max, often shortened to 3ds Max, is a PC-based 3D animation rendering and production software. The native 3ds Max .Max file format is a complete scene format, containing all components and references to scene content within the file.
[0022] 2) Maya
[0023] Maya is a 3D animation software used for professional film and television advertising, character animation, and film special effects. In Maya, the native file format is either .ma or .mb.
[0024] 3) MoBu
[0025] MotionBuilder, short for MotionBuilder, is one of the most important 3D character animation software in the industry. It integrates many excellent tools, ensuring the production of high-quality animations. FBX is the native file format of Autodesk MotionBuilder.
[0026] 3) DCC software
[0027] A general term for 3D animation production software, including 3ds Max, Maya, MoBu, etc.
[0028] 4) Batch processing
[0029] Perform batch conversion operations on data format and / or content, for example: convert the resource format of DCC software, such as 3ds Max and Maya software format, to FBX format.
[0030] 5) Autodesk FBX
[0031] Autodesk FBX is a free, cross-platform software format for 3D authoring and exchange. FBX allows users to access 3D files from most 3D vendors. The FBX file format supports all major 3D data elements, as well as 2D, audio, and video media elements.
[0032] 6) DCC Interoperability Technology
[0033] The technology that allows external software to interact with DCC software allows the external software to perform data processing tasks on DCC software by issuing instructions. Here, external software can be understood as a collection of all client software other than DCC software.
[0034] In the field of 3D model design, the number of 3D software programs is increasing, leading to a growing demand for file format and content conversion between these programs, especially the conversion of DCC software resource formats to FBX format, such as 3ds Max and Maya formats. In some application scenarios, external software can establish communication with DCC software by issuing data processing commands, and then control DCC software to perform data processing tasks such as format conversion, content conversion, and data import.
[0035] In related technologies, communication between external software and DCC typically requires additional plugins. Generally, this necessitates manually opening the DCC software and configuring plugins written in corresponding scripting languages (such as Python, Mel, MaxScript, C++, etc.). While the DCC software is running, these plugins read data stored in the external software to perform subsequent command operations. This approach, with its numerous plugins, can lead to functional and interface complexity, increasing the complexity of the DCC software. Furthermore, the process of installing and interacting with these plugins often requires more configuration, increasing the user's learning curve and impacting data processing efficiency.
[0036] In addition, in the relevant DCC interoperability technology, when performing tasks such as data format conversion, content conversion and data writing on DCC software, it is basically achieved through manual processing. It is rare to be able to control the DCC software to automatically complete batch data processing, especially when the amount of data processing tasks is large, the operation is cumbersome and inefficient.
[0037] Based on this, the data processing method, apparatus, and electronic device provided in this invention improve data processing efficiency by using external software to communicate directly with the target software, eliminating the need for plugins in the DCC software and enabling fully automated data processing. This technology can be applied in the field of data processing technology, particularly in 3D animation production, model rendering, or other scenarios requiring the processing of large amounts of data.
[0038] To facilitate understanding of this embodiment, a data processing method disclosed in this embodiment will first be described in detail, such as... Figure 1 As shown, the method includes the following steps:
[0039] Step S102: Receive data processing instructions, and determine the target data to be processed, the data processing method, and the software version information based on the data processing instructions; wherein, the data processing method includes data batch processing operation and / or data writing; the software version information indicates the software type and software version of the target software used to process the target data;
[0040] It should be noted that the executing entity of this invention can be a system device with external software installed, or a terminal or server with external software installed; the specific implementation is not limited here. This embodiment of the invention uses a terminal with external software (hereinafter referred to as an external terminal) as an example for illustration.
[0041] The aforementioned data processing instructions are generated based on user operations. These instructions include information such as the data to be processed, the data processing method, and the software version. Upon receiving the instructions, the external terminal determines the target data, processing method, and software version from these instructions. Here, the target data is a file or file cluster with a specified data format and content. Data processing methods include batch processing and / or data writing. That is, the external terminal can receive instructions that include either batch processing or data writing, or instructions that include both. For example, batch writing of the target data's format and / or content, or simple data writing. Furthermore, the data processing process depends not only on the software type used to process the target data but also on the specific software version. Therefore, it is also necessary to obtain the target software type and the user-selected software version from the data processing instructions to determine the target software version information.
[0042] Taking the batch conversion of DCC software files to FBX format as an example, the data processing method in this way is a batch data processing operation. The target data to be processed can be a file cluster with one or more data formats such as MoBu, 3dsMax, and Maya. Correspondingly, the target software can be one or more types of software such as MoBu, 3dsMax, and Maya in DCC software. The software version information of the target software can be 3dsMax 2018 version, Maya 2021 version, etc.
[0043] In this step, the target data to be processed, the data processing method, and the software version information are determined according to the data processing instructions, providing the target data, data processing method, and software information for communication between the external software and the DCC software. The batch data processing method allows for automated batch processing of the target data, significantly saving time and labor costs.
[0044] Step S104: Confirm that the target software indicated by the software version information has started;
[0045] The target software indicated by the software version information is determined based on the software version information. The target software status is then used to determine whether the target software is running. If the target software is not running, it needs to be started. For example, to convert the file format of 3ds Max software to FBX format in a batch process, it is necessary to ensure that the corresponding version of 3ds Max software indicated in the software version information obtained according to the data processing instructions is running.
[0046] Step S106: Based on the data processing method and the software type of the target software, determine the target communication method for communicating with the target software;
[0047] Based on the data processing method and the target software type, the terminal determines the communication method for direct communication with the target software. Here, different communication methods are designed for different data processing methods and different target software types.
[0048] For example, taking the batch conversion of DCC software files to FBX format as an example, the data processing method in this mode is batch data processing. If the target software type is 3ds Max, the terminal sets the target communication mode to socket communication; if the target software type is Maya, the terminal communicates with Maya software using the Maya software server. Similarly, when using an external terminal to write data to DCC software files, if the target software type is 3ds Max, the target communication mode is determined to be handle communication; if the target software type is Maya, the target communication mode is determined to be socket communication.
[0049] In this step, based on the data processing method and the target software type, the target communication method for communicating with the target software can be determined. It should be noted that this communication method does not require the installation of any additional plugins, thus avoiding any impact on software performance and reducing the complexity of communication operations.
[0050] Step S108: Through target communication, control the target software to process the target data according to the data processing method to obtain the processed target data.
[0051] In other words, after determining the communication method, the data processing instructions are sent to the corresponding target software according to the target communication method to control the target software to perform batch data processing or data writing operations on the target data, and obtain the processed target data. Taking the aforementioned batch processing of 3ds Max software file format to FBX format as an example, in this method, the communication method between the external terminal and 3ds Max software is determined to be socket communication. Through socket communication, the data processing instructions are sent to the corresponding version of 3ds Max software to control the software to perform batch conversion operations on the target file data format and obtain the conversion result.
[0052] In this step, the target software is controlled to process the target data according to the data processing method through the target communication method, resulting in the processed target data. Under this method, the communication method between the external software and the target software is determined based on the data processing method and the software type of the target software. This allows the external software to communicate directly with the target software without the need for additional plugins, avoiding any impact on software performance and reducing the complexity of communication operations. Furthermore, the data processing method using batch processing operations efficiently and accurately processes the software data, saving labor and time costs and improving data processing efficiency.
[0053] The aforementioned data processing method receives data processing instructions and determines the target data to be processed, the data processing method, and software version information based on these instructions. The data processing method includes batch data processing and / or data writing. The software version information indicates the software type and version of the target software used to process the target data. The method confirms the startup of the target software indicated by the software version information. Based on the data processing method and the target software type, the method for communicating with the target software is determined. Through the target communication method, the target software is controlled to process the target data according to the data processing method, resulting in the processed target data. This method achieves large-scale data processing through interaction between external software and the target software, resulting in high data processing efficiency. Simultaneously, by determining the communication method between the external software and the target software based on the data processing method and the target software type, a more appropriate communication method is used between the external software and the target software, eliminating the need for additional plugins, reducing software complexity, and ensuring software performance.
[0054] Before receiving data processing instructions from an external terminal, it is necessary to obtain relevant information about the target software. The following example uses DCC software as the target software to illustrate the specific implementation method for obtaining the software type and version of the target software.
[0055] Specifically, the process involves acquiring the target data to be processed, determining the software type of the target software based on the data type, detecting the registry and software installation path in the specified device, determining at least one available version of the target software, and displaying the version identifier of the at least one available version. In response to the selection of the first version identifier in the version identifier, the process determines the software version of the target software.
[0056] The data type of the target data to be processed can be one of the file formats such as MoBu, 3ds Max, or Maya, or a hybrid type combining multiple file formats; correspondingly, the software type of the target software processing the target data includes MoBu, 3ds Max, Maya, etc. The specified device refers to the device with the DCC software installed. The version identifier is a unique identifier used to identify the software version.
[0057] The system acquires the target data to be processed and determines the corresponding type of DCC software based on the data type. Further, it obtains the software installation path by detecting the registry entries generated during DCC software installation. First, it checks whether the DCC software of that type is correctly installed in the installation path. If correctly installed, there should be at least one usable version of that type of DCC software. The system then lists and displays the available DCC software and their version identifiers for the user to select on the terminal.
[0058] Furthermore, in response to the user's selection of the version identifier, the software version of the target software is determined. For example: 3ds Max 2018, 3ds Max 2012, etc.
[0059] The above method determines the software type of the target software by the data type of the target data to be processed. Users can obtain the software installation path and select the software version through the registry.
[0060] After receiving a data processing instruction, the terminal first determines the current working status of the software associated with the instruction to determine subsequent data processing tasks based on the current working status of each software. Taking the receipt of a data processing instruction to convert DCC software's batch file format to FBX format as an example, after obtaining the instruction, the external terminal determines the current working status of each DCC software associated with the instruction to determine whether any unprocessed data exists in each software. Specifically, based on the pre-recorded processing progress of each software on historical data, the current working status of each software is determined; the current working status indicates whether there is unprocessed data and displays the current working status of each software.
[0061] In practice, the terminal can search local internal records and, based on the pre-recorded processing progress of historical data by each DCC software, determine whether any software has unprocessed data. For example, the terminal's internal records may indicate: there are 5 3ds Max software files requiring format conversion, 3 of which have been converted, leaving 2 files with unprocessed data; there are 3 Maya software files requiring format conversion, 1 of which has been converted, leaving 2 files with unprocessed data.
[0062] After confirming the current working status of each software, further, based on the software status of the target software, determine whether the target software is started; if the target software is not started, start the target software.
[0063] Understandably, when the data processing task continues to execute, it means that the target software is starting up; when the task stops executing, it means that the target software has not started and the user needs to start the target software.
[0064] It should be noted that during the data processing task execution of the target software, it can be set to start in the background to keep the software startup process hidden from the user, thereby reducing the complexity of the displayed interface.
[0065] Specifically, if the target software is of the preset first type and the data processing method is data batch processing operation, during the startup process of the target software, the window handle of the child window to be displayed during the startup process of the target software is searched through the preset application interface; and the child window to be displayed is hidden through the window handle.
[0066] The first preset type mentioned above can be the 3ds Max software type; the application interface mentioned above can be the Windows API (Windows Application Programming Interface), which can execute application commands based on the Windows operating system; the window handle mentioned above is a unique identifier assigned to each window by the system, and the window can be found based on the window handle.
[0067] In other words, when the terminal controls the batch conversion of the 3ds Max software file format to FBX format, it can use the Windows API to search for the window handle of the child window to be displayed during the startup process of the specified version of 3ds Max software, and hide the child window to be displayed through the window handle.
[0068] It's worth noting that the above method can be used throughout the entire process from the 3ds Max software's background startup to task completion. By searching for handles, the child windows that appear when 3ds Max starts can be hidden one by one. This allows users to perform 3ds Max operations without seeing the 3ds Max client running. This is especially beneficial for batch processing tasks, reducing the complexity of the display interface. When it's necessary to display the task execution process, a simple click can wake up the specified version of the DCC software process in the background, improving the user experience.
[0069] In the relevant DCC interoperability technologies, the communication technology between external terminals and each type of DCC software has certain limitations.
[0070] 1) Regarding 3ds Max:
[0071] OLE (Object Linking and Embedding) communication technology: This method requires the Maxscript script to be placed in a fixed folder. Reinstalling the 3ds Max software will cause it to fail. Moreover, it cannot handle complex commands, commands to create windows, etc., and can only be implemented through specific scripts. When multiple 3ds Max programs are open on the computer, it is still impossible to solve the problem of selecting a specific 3ds Max program to execute commands.
[0072] Window handle communication technology: Communication is achieved through window handles. The communication method can be based on the Windows message WM_COPYDATA. It is only suitable for external calls of simple commands. Complex instructions can only be implemented by executing Maxscript scripts in the 3ds Max software, but the execution results cannot be obtained.
[0073] 2) Regarding Maya:
[0074] Batch tool: Batch, meaning "batch" in Chinese. If you use the batch.exe that comes with Maya for batch processing, you can only execute the specified mel scripts and it does not have continuous interactive communication capabilities. It cannot be interacted with during operation and will automatically close after executing a command.
[0075] Based on this, the present invention designs different communication methods for different data processing methods and different target software types, and performs data processing in conjunction with data processing operations under the corresponding communication methods, so as to make up for the defects of the above-mentioned communication technologies in data processing.
[0076] First, the following embodiments provide the implementation process of data processing technology in which a terminal controls a specified version of DCC software to perform data processing when the data processing method is data batch processing.
[0077] Specifically, firstly, the appropriate communication method is determined based on the different target software types:
[0078] If the target software's software type is the preset first type, the target communication method is determined to be socket communication; if the target software's software type is the preset second type, the target communication method is determined to be communication through the target software's server.
[0079] The first preset type can be the 3ds Max software type, and the second preset type can be the Maya software type. The socket communication method is essentially an endpoint in the communication connection between two networks, which can realize data transmission between two applications and make up for the shortcomings of OLE and window handle communication methods in that they cannot obtain the processing results.
[0080] In other words, when the target software communicating with the terminal is 3ds Max, the communication method is socket communication; when the target software communicating with the terminal is Maya, communication is conducted through the server of the corresponding version of Maya software.
[0081] Next, based on different communication methods, corresponding data processing technologies are provided:
[0082] In one specific method, when the communication method is socket communication, the corresponding data processing technology is as follows: through a preset first socket, data processing instructions are sent to the target software to control the target software to perform batch conversion operations on the format and / or content of the target data, obtain the conversion results, and return the conversion results; and receive the conversion results returned by the target software.
[0083] The above data batch processing includes batch processing of file formats and batch processing of content, or it can be a batch processing operation of only one of the file formats or file content.
[0084] Taking the batch conversion of 3ds Max files to FBX format as an example, this means that by sending data processing instructions directly to the corresponding version of 3ds Max through a pre-set first socket, the software can use the Maxscript script built into 3ds Max to control the software to perform batch conversion operations on the format and / or content of the target data. After successful conversion, the batch conversion result is obtained, and the conversion result is automatically returned to the terminal. The terminal simply needs to receive the conversion result returned by the target software.
[0085] It should be noted that during batch conversion operations, the terminal also needs to determine whether there is already converted target data in the terminal device to prevent repeated conversions from increasing the conversion burden.
[0086] Specifically, it determines whether target data that meets specified conditions is found; wherein, specified conditions include specified format or specified content; if target data that meets specified conditions is not found, it is determined that the target data needs to be converted, and the step of sending data processing instructions to the target software through the preset first socket is executed; if target data that meets specified conditions is found, it is determined that the target data does not need to be converted, and the target data that meets specified conditions is used as the conversion result.
[0087] Taking the batch conversion of files to FBX format in 3ds Max software as an example, during the batch conversion process, the system first checks the terminal device for FBX format target data to determine if the target data has already been converted, thus avoiding duplicate conversions. If no FBX format target data is found, it means that the target data has not been batch converted and needs to be converted. That is, the data processing command is sent to 3ds Max software for batch data processing. If FBX format target data is found, it means that the batch of target data has been batch processed and does not need to be converted again. The found FBX format target data can be used as the conversion result.
[0088] It is worth noting that after the data processing command is sent to the corresponding version of 3ds Max software, the software status of the target software can also be obtained in real time. Specifically, the software status of the target software and the processing progress of the target software for the target data can be obtained in real time or periodically through the first socket. If the software status of the target software is a crash, the query information of the target software is displayed. This query information is used to ask whether to restart the target software.
[0089] In other words, the technology of communicating with 3ds Max software through the first socket can obtain the software status of the target software in real time or at regular intervals, check the status and processing progress of 3ds Max during batch processing, so as to ensure that the corresponding files can be converted successfully. If the software status of the target software is crashed, the target software's query information can also be displayed through pop-up windows to ask the user whether they need to restart 3ds Max to continue the conversion.
[0090] The above-mentioned method of establishing socket communication with an external terminal, in conjunction with the pre-set script of the first type of DCC software, controls the DCC software of this type to perform data batch processing operations. During the conversion operation, the terminal can also obtain the software status and the processing progress of the target data in real time or at regular intervals through the pre-set socket, ensuring the efficiency and accuracy of the conversion process. At the same time, after the conversion is completed, the conversion result can be returned for the external terminal to receive. Especially in terms of 3ds Max software, the method of establishing socket communication between the Maxscript script and the external software makes up for the shortcomings of OLE and window handle communication methods that cannot obtain the processing results, thus improving the user experience.
[0091] In another specific approach, when the communication method is through the target software's server, the corresponding data processing technology is as follows: Obtain the target software's interpreter program through the target software's installation path; run a preset script file through the interpreter program to register a second socket via the script file; wherein, the second socket is used to: occupy an idle port to run the target software's first server; send data processing instructions to the first server to control the target software to perform batch conversion operations on the target data's format and / or content, obtain conversion results, and return the conversion results; receive the conversion results returned by the target software.
[0092] The aforementioned interpreter program translates a program in one language into an equivalent program in another language for the program to run. The interpreter program can be used to add or convert the scripting language of the target software, enabling the target software to run the corresponding scripts and execute script commands. The aforementioned first server is the server used for communication in the aforementioned target communication method, and can be a server included with the DCC software.
[0093] Taking the batch processing of Maya software files into FBX format as an example, the installation path of Maya is obtained by detecting the registry entries generated during the local installation of Maya. From this path, the mayapy.exe file in the installation directory of the corresponding version of Maya is located. This file is a Python interpreter program that can run Python scripts containing the Maya API. Here, a Python interpreter program is used to convert the scripting language into Python scripts. This type of script can easily transform complex and disordered data into usable structured data. This characteristic is very helpful for big data processing, and it also has the function of continuous interactive communication.
[0094] Furthermore, the external terminal registers a Socket (the second socket mentioned above) locally by executing a Python script. This Socket occupies an unused port and runs on the first server. Here, since mayapy.exe (the Python interpreter program) can directly call Maya's pre-built functions, it's not necessary to start a Maya process in the background when performing batch data processing operations. The external terminal only needs to use the corresponding version of mayapy.exe to start the Python script, generating a windowless background server for batch processing, which serves as the first server for communication with the target software. Data processing instructions are sent to the first server, which controls the target software to perform batch conversion operations on the format and / or content of the target data, obtain the conversion results, and return the conversion results to the external terminal. Once the external terminal receives the conversion results returned by the target software, one batch data processing operation is complete.
[0095] Similarly, external terminals can also obtain the working status of Maya software in real time. Specifically, the first server monitors the working status of the target software and returns the monitored status information of the target software; and the terminal receives the status information of the target software returned by the first server.
[0096] In other words, the first server also implements the function of monitoring the working status of the target software and returning the monitored status information of the target software to the external terminal. For example, it can monitor in real time whether the conversion task in operation has been completed, and return the completion information to the external terminal after completion, thus realizing the communication interaction of batch processing.
[0097] The aforementioned method of using DCC software servers for communication combines script interpreter calls with socket communication technology to achieve a batch processing function that enables real-time interactive communication. In particular, for the data processing technology of Maya software, a Python-based script was developed. By directly starting the Python language interpreter to run the Python script, it has the function of continuous interactive communication, which perfectly solves the shortcoming of the batch tool that does not have continuous interactive communication, improves the speed of batch processing tasks, and enhances the user experience.
[0098] To gain a more systematic understanding of the process of using an external terminal to control DCC software to complete batch data processing operations in this application, specific embodiments of converting batch files into FBX format files using 3ds Max and Maya software via an external terminal are provided below.
[0099] like Figure 2As shown, in the data processing flow of 3ds Max software, conversion tasks are sent to an external terminal in the form of data processing instructions. After receiving the data batch processing instructions, the external terminal queries internal records to determine whether there are currently any tasks that have not yet been converted. It also uses the Windows API to hide the 3ds Max software process, and then uses a Socket to establish communication with 3ds Max, executes the data batch processing operation, and checks the status of 3ds Max during the batch processing to ensure that the corresponding files can be converted successfully. After receiving the batch conversion command, 3ds Max software executes the Maxscript script built into 3ds Max software to control the software to perform batch conversion operations on the format and / or content of the target data. After successful conversion, the results are automatically returned to the external terminal.
[0100] Specifically, during batch data conversion operations, the system pre-checks the terminal device for FBX format target data to determine if the batch of target data has already been converted, thus avoiding duplicate conversions. If conversion of the batch of data is confirmed, the system checks if 3ds Max is receiving the conversion task for the first time since the software was opened, and if 3ds Max is installed on the computer. Once the software is confirmed to be installed and open, the system sends batch data processing instructions to the corresponding version of 3ds Max via a pre-defined socket. This controls 3ds Max to perform batch conversion operations on the format and / or content of the target data, obtains the conversion results, and automatically returns a success signal and conversion result to the terminal. Simultaneously, the system considers both the number of times the processing task is received and the real-time status of 3ds Max to provide timely feedback to the user. This avoids the drawbacks of OLE and window handle communication methods, which cannot obtain processing results, thus improving the user experience.
[0101] like Figure 2 As shown, the following steps 1)-5) need to be implemented in the data processing workflow of Maya software:
[0102] 1) Send the conversion task to the external terminal in the form of data processing instructions.
[0103] 2) Obtain the path to the Mayapy interpreter and install the Mayapy interpreter.
[0104] The external terminal obtains the Maya software installation path by detecting the registry entries generated during the local Maya software installation. It then lists the available Maya software versions for the user to select. After selecting the desired Maya version for batch processing, the user obtains the Mayapy interpreter path from the DCC installation path and installs mayapy.exe (the Mayapy interpreter).
[0105] 3) Generate and start the background server (i.e., the first server).
[0106] Since mayapy.exe can directly call Maya's built-in functions, it is not necessary to start a Maya process in the background when performing batch processing tasks. An external terminal can simply use the corresponding version of the mayapy.exe startup script to generate a windowless background server for batch processing and start it.
[0107] 4) Run the server.
[0108] An external terminal executes a Python script to register a socket locally and occupy an unused port, running on the aforementioned backend server.
[0109] The external terminal uses a separate thread to listen to and forward commands to the backend server. It's important to note that because the Maya API requires the main thread to execute correctly, the server itself needs to be a thread that listens for commands from the external terminal. A loop is maintained in the main thread to wait for task instructions from the server thread. Furthermore, the backend server implements a task monitoring function, continuously monitoring the completion of running transformation tasks and automatically returning completion information to the external software upon completion, thus achieving batch processing communication.
[0110] 5) Send the data processing instructions to the backend server so that the Maya software can execute Mel or Python scripts to perform batch conversion operations on the format and / or content of the target data, obtain the conversion results, and return the conversion results.
[0111] In this approach, the Python script is run directly by launching Maya's built-in Python interpreter. The script maintains a main thread for handling Maya's business logic to ensure continuous background task execution. A child thread maintains a Socket Server to communicate with the outside world. By combining Maya's encapsulated APIs with Socket communication technology, the script interpreter enables real-time interactive batch processing. Once started, the script runs continuously, remaining in standby mode when there are no tasks, waiting for the next task to be sent. This perfectly solves the problem of batch tools lacking continuous interactive communication, improving the speed of batch processing tasks while also enhancing the user experience.
[0112] The following embodiments provide an implementation process for data processing technology in which a terminal controls a specified version of DCC software to perform data processing when the data processing method is data writing.
[0113] Specifically, firstly, the appropriate communication method is determined based on the different target software types:
[0114] When the data processing method includes data writing; if the target software's software type is the preset first type, the target communication method is determined to be handle communication; if the target software's software type is the preset second type, the target communication method is determined to be socket communication.
[0115] Here, since the data processing method for controlling DCC software data writing is a relatively simple external command call, when the data processing method is data writing and the target software type for communicating with the terminal is 3ds Max, the communication method is handle communication; while when the target software type for communicating with the terminal is Maya, socket communication is used.
[0116] Next, based on different communication methods, corresponding data processing technologies are provided:
[0117] In one specific method, when the communication method is handle communication, the corresponding data processing technique is as follows: obtain the software process of the target software, obtain the listener window handle of the target software through the software process; obtain the listener window of the target software through the listener window handle; send data processing instructions to the specified script of the target software through the listener window, so as to control the writing of target data into the target software through the specified script.
[0118] Since data writing operations do not require much information transmission compared to data batch processing operations, and the data writing operation needs to be completed relatively quickly, it is only necessary to find the listener of the corresponding target software and send the instruction to execute the script.
[0119] Taking 3ds Max software as an example, first, obtain all 3ds Max processes opened on the external terminal, and then find the handles of their respective MaxScript listener windows. Obtain the 3ds Max software's listener window through the listener window handle. Next, send data processing commands to the 3ds Max software's MaxScript script through the listener window, for example, by using the SendMessage method to send commands to the window containing the handle. After the data is successfully written, return the result to the external terminal.
[0120] In the above approach, considering the lack of need for long-term maintenance of the 3ds Max state and the requirement for high speed, a completely new handle communication method was chosen. The script information to be executed is directly sent to the corresponding Maxscript listener window, and the script is executed to fulfill the data writing requirement. This technology has opened up a completely new approach for the development of many subsequent features in the project.
[0121] In another specific approach, when the communication method is socket communication, the corresponding data processing technique is as follows: detect the target port occupied by the process corresponding to the target software; send a data write command written in the first language to the target port through a preset third socket; if the target port receives the data write command written in the first language, and the process of the target software receives the data write instruction on the target port, execute the write of the target data into the target software.
[0122] The process corresponding to the target software can be understood as a running activity related to data processing within the target software program. A process can communicate with other processes or software through the ports it occupies. Each process has a unique PID (Process Identifier). Here, taking Maya software as an example, one process corresponds to one version of Maya software. The primary language mentioned above can be Python scripting language.
[0123] The external terminal iterates through system processes, finding Maya-related processes for the user to select, and retains the process ID (PID) and process window name (Maya needs to filter out useless output windows). The user selects the Maya process to communicate with, and communication is established via socket technology. A data write command written in Python scripting language is sent to the target port corresponding to the process through a preset third socket. This is used to check if the port is a Python port capable of receiving Python script commands. If the target port receives the Python script data write command, and the Maya process receives the Python script on the target port, it means the target port is a Python port, and communication with Maya has been successfully established. Maya then begins executing the script command and enters the data write task process, writing the target data into the Maya software.
[0124] Another scenario is that if the target port does not receive data write commands written in the first language, it sends data write commands written in the second language to the process window corresponding to the target software.
[0125] In other words, if the target port does not receive data write commands from the Python script, it means the target port is not a Python port. In this case, a Python script execution command written in statements corresponding to the target port type needs to be sent to the process window corresponding to the Maya software to enable the port to accept data write commands. For example, if the target port is a Mel port (Maya's native scripting language), the external terminal will send another Python script execution command written in Mel statements to the process window corresponding to the Maya software. Similarly, the Maya process will begin completing the task after receiving the script execution command on the port.
[0126] In the above method, socket communication technology is also used. Based on the target port type occupied by the process corresponding to the target software, a Python script execution command written with the statement corresponding to the target port type is sent to the process window of the target software to perform the data writing operation. After successful writing, the result can also be returned to the external terminal. This method perfectly solves the shortcoming of the batch tool that does not have continuous interactive communication, improves the speed of tasks, and enhances the user experience.
[0127] To gain a more systematic understanding of the process of external terminal controlling DCC software to complete data writing operations in this application, specific embodiments of writing target data into software files through external terminals are provided below for 3ds Max and Maya software, respectively.
[0128] like Figure 3 As shown, in the data processing flow of 3ds Max software, after the external terminal receives the data write command, it first queries all the 3ds Max processes open on the terminal, and finds the handle of the respective MaxScript listener window based on these processes. The command is then sent to the window containing the handle using the SendMessage method. The data processing command is then sent to the MaxScript script in the 3ds Max software through the listener window. The MaxScript script executes the data write process, and after the data is written to the file in 3ds Max software, the result is automatically returned to the external terminal.
[0129] This method directly sends the script information to the corresponding Maxscript listener window through a novel handle-based communication mechanism. The script is then executed to write the data. Upon successful writing, a signal is automatically returned to the external terminal. This overcomes the limitations of OLE and window handle-based communication methods, which cannot obtain processing results, thus improving the user experience. This technology opens up a completely new avenue for the development of many subsequent features in the project.
[0130] like Figure 3As shown, in the data processing workflow of Maya software, the following steps 1)-5) need to be implemented:
[0131] 1) After receiving the data write command, the external terminal traverses the system processes, finds the Maya-related processes for the user to select, and retains the process PID and process window name (Maya needs to filter out useless Output windows).
[0132] 2) The user selects the Maya process to communicate with and initiates communication via Socket technology. At this point, all ports currently used by the process are checked, and a port detection signal is sent to verify that the port is a Python port capable of receiving Python script commands, rather than a Mel port. If it is a Mel port, the external software will send the Python script execution command written in Mel statements to this window again. If the Maya process does not detect any ports, the external software will display an error message prompting the user to manually enable the port.
[0133] 3) Based on the different types of ports, after sending the Python script execution command written with the statement corresponding to the port type, communication with Maya software is successfully established.
[0134] 4) The Maya process begins executing script commands to enter the data writing task flow, writing the target data into the Maya software.
[0135] 5) After the data is written to the file in the 3ds Max software, it will automatically return a write success signal and data result to the external terminal.
[0136] The above method sends a Python script execution command, written with the corresponding statement for the target port type, to the process window of the Maya software, based on the target port type used by the Maya software process. This executes the data writing operation, and after successful writing, it can also return the result to the external terminal. This method perfectly solves the shortcoming of the Batch tool that does not have continuous interactive communication, improving the speed of the task while also enhancing the user experience.
[0137] It is worth noting that this invention also provides a method for data processing in the face of numerous complex application scenarios. Specifically, if the software version information includes multiple types, a thread is established for each type of software version information to create a manager corresponding to each software version information through each thread. The manager executes the following steps of the above data processing method: confirming that the target software indicated by the software version information corresponding to the manager has started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; and controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data.
[0138] The software version information mentioned above includes multiple versions, which can be understood as different types of DCC software and / or different versions of the same type of DCC software. The manager mentioned above is a tool used to manage the data processing tasks of this thread and has the function of automatically restarting the software corresponding to the version information of this thread.
[0139] Here, a thread is created for each software version information, and a manager corresponding to each software version information is created through each thread. This allows for batch format conversion of files of different formats to be performed simultaneously in a multi-threaded manner, and also has the function of automatically restarting the software corresponding to the version information of that thread.
[0140] For example, if a single 3ds Max software crashes, 3ds Max will automatically restart to continue data processing tasks; or, when processing individual abnormal files, there is a chance that the process will crash, and the safe restart mechanism of the pipeline will quickly resolve this situation; another situation is when dealing with batch processing of mixed files (i.e., 3ds Max and Maya coexisting), multiple managers can be started using multi-threading to communicate with multiple DCC software via ports, avoiding port number conflicts during initialization, thereby resolving communication failures, crashes, and other problems.
[0141] In addition, the manager, like an external terminal, can control the DCC software to perform data processing. Specifically, the steps include: confirming that the target software indicated by the software version information corresponding to the manager has started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; and controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data. This step is the same as the process of an external terminal, so it will not be described in detail.
[0142] The aforementioned method of establishing a manager corresponding to each software version information for each thread is used to manage the data processing tasks of that thread, preventing the data processing process from being affected by the failure of a single software program, and ensuring the smooth completion of data processing tasks. In addition, this method can also perform batch format conversions on files of different formats simultaneously in a multi-threaded manner, greatly improving data processing efficiency.
[0143] In another scenario, to improve the speed of batch processing tasks, a multi-process approach can be used. A general manager object can be used to detect the current idle / busy status of the server queue and continuously distribute tasks to idle processes, thereby improving the overall operating efficiency.
[0144] For the corresponding method embodiments described above, see [link to relevant documentation]. Figure 4 The diagram shows a data processing apparatus, which includes:
[0145] The first information determination module 402 is used to receive data processing instructions and determine the target data to be processed, the data processing method, and the software version information based on the data processing instructions; wherein, the data processing method includes data batch processing operation and / or data writing; the software version information indicates the software type and software version of the target software used to process the target data;
[0146] The second information determination module 404 is used to confirm the startup of the target software indicated by the software version information.
[0147] The communication method determination module 406 is used to determine the target communication method for communicating with the target software based on the data processing method and the software type of the target software.
[0148] The data processing module 408 is used to control the target software to process the target data according to the data processing method through the target communication method, so as to obtain the processed target data.
[0149] The aforementioned data processing device, during the interaction between external software and target software, determines the communication method between the external software and target software based on the data processing method and the software type of the target software. This allows the external software and target software to communicate directly without the need for additional plugins, avoiding any impact on software performance and reducing the complexity of communication operations. Furthermore, the data processing method employing batch processing operations efficiently and accurately processes software data, saving labor and time costs and improving data processing efficiency.
[0150] The aforementioned device further includes a third information determination module, used to acquire target data to be processed, determine the software type of the target software for processing the target data based on the data type of the target data; detect the registry and software installation path in the specified device, determine at least one available version of the target software, and display the version identifier of at least one available version; and determine the software version of the target software in response to the selection operation of the first version identifier in the version identifier.
[0151] The aforementioned device also includes a working status determination module, used to determine the current working status of each software based on the pre-recorded processing progress of each software on historical data; wherein, the current working status indicates whether there is unprocessed data; and displays the current working status of each software.
[0152] The aforementioned second information confirmation module is also used to determine whether the target software is started based on the software status of the target software; if the target software is not started, the target software is started.
[0153] The aforementioned device further includes a window hiding module, used to, if the software type of the target software is a preset first type and the data processing method is a data batch processing operation, search for the window handle of the sub-window to be displayed during the startup process of the target software through a preset application interface; and hide the sub-window to be displayed through the window handle.
[0154] The above data processing method includes: data batch processing operation; the above communication method determination module is further used to determine the target communication method as socket communication if the software type of the target software is a preset first type; and to determine the target communication method as communication through the server of the target software if the software type of the target software is a preset second type.
[0155] The above data processing methods include: batch data processing operations; the above target communication methods include socket communication; the above data processing module is also used to send data processing instructions to the target software through a preset first socket, so as to control the target software to perform batch conversion operations on the format and / or content of the target data, obtain conversion results, and return conversion results; and receive the conversion results returned by the target software.
[0156] The aforementioned device further includes a first display module, used to acquire the software status of the target software and the processing progress of the target software for the target data in real time or periodically through the first socket; if the software status of the target software is a crash state, the module displays the query information of the target software; the query information is used to ask whether to restart the target software.
[0157] The aforementioned device further includes a fourth information determination module, used to determine whether target data satisfying specified conditions is found; wherein, the specified conditions include specified format or specified content; if target data satisfying the specified conditions is not found, it is determined that the target data needs to be converted, and the step of sending data processing instructions to the target software through a preset first socket is executed; if target data satisfying the specified conditions is found, it is determined that the target data does not need to be converted, and the found target data satisfying the specified conditions is taken as the conversion result.
[0158] The aforementioned data processing method includes: batch data processing operation; the aforementioned target communication method includes: communication through the server of the target software; the aforementioned data processing module is further used to obtain the interpreter program of the target software through the installation path of the target software; run a preset script file through the interpreter program to register a second socket through the script file; wherein, the second socket is used to: occupy an idle port to run the first server of the target software; send data processing instructions to the first server to control the target software to perform batch conversion operations on the format and / or content of the target data through the first server, obtain conversion results, and return conversion results; and receive the conversion results returned by the target software.
[0159] The aforementioned device also includes a status information determination module, used to monitor the working status of the target software through the first server, return the monitored status information of the target software, and receive the status information of the target software returned by the first server.
[0160] The above data processing method includes: data writing; the above communication method determination module is further used to determine the target communication method as handle communication method if the software type of the target software is a preset first type; and to determine the target communication method as socket communication method if the software type of the target software is a preset second type.
[0161] The above data processing method includes: data writing; the above target communication method includes handle communication; the above data processing module is also used to obtain the software process of the target software, obtain the listener window handle of the target software through the software process; obtain the listener window of the target software through the listener window handle; and send data processing instructions to a specified script of the target software through the listener window, so as to control the writing of target data into the target software through the specified script.
[0162] The above data processing method includes: data writing; the above target communication method includes socket communication; the above data processing module is also used to detect the target port occupied by the process corresponding to the target software; send a data writing command written in the first language to the target port through a preset third socket; if the target port receives the data writing command written in the first language, and the process of the target software receives the data writing instruction at the target port, execute the writing of the target data into the target software.
[0163] The above method also includes: if the target port does not receive data write commands written in the first language, sending data write commands written in the second language to the process window corresponding to the target software.
[0164] The aforementioned device further includes a manager data processing module, used to establish a thread for each software version if the software version information includes multiple versions, so as to establish a manager corresponding to each software version through each thread, and to execute the following steps of the above data processing method through the manager: confirming that the target software indicated by the software version information corresponding to the manager has started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; and controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data.
[0165] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described data processing method. This electronic device can be a server or a terminal device.
[0166] See Figure 5 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-described data processing method.
[0167] Furthermore, Figure 5The illustrated electronic device also includes a bus 102 and a communication interface 103. The processor 100, communication interface 103, and memory 101 are connected via the bus 102. The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk drive. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless). The interface can utilize the Internet, wide area network, local area network, metropolitan area network, etc. The bus 102 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 5 The diagram uses only a single bidirectional arrow, but this does not imply a single bus or a single type of bus. Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. Processor 100 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0168] The processor in the aforementioned electronic device, by executing machine-executable instructions, can perform the following operations of the aforementioned data processing method: receiving data processing instructions; determining the target data to be processed, the data processing method, and software version information based on the data processing instructions; wherein, the data processing method includes data batch processing operations and / or data writing; the software version information indicates: the software type and software version of the target software used to process the target data; confirming that the target software indicated by the software version information has started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; and controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data.
[0169] The above method determines the communication method between the external software and the target software based on the data processing method and the type of the target software during the interaction process. This allows the external software and the target software to communicate directly without the need for additional plugins, thus avoiding any impact on the software's performance and reducing the complexity of communication operations. In addition, the data processing method using batch processing operations efficiently and accurately processes the software data, saving labor and time costs and improving data processing efficiency.
[0170] The processor in the aforementioned electronic device can perform the following operations of the aforementioned data processing method by executing machine-executable instructions: acquiring target data to be processed; determining the software type of the target software for processing the target data based on the data type of the target data; detecting the registry and software installation path in the specified device; determining at least one available version of the target software; and displaying the version identifier of the at least one available version; and determining the software version of the target software in response to the selection of the first version identifier in the version identifier.
[0171] The processor in the aforementioned electronic device can perform the following operations of the aforementioned data processing method by executing machine-executable instructions: determining the current working status of each software based on the pre-recorded processing progress of historical data by each software; wherein, the current working status indicates whether there is unprocessed data; and displays the current working status of each software.
[0172] The processor in the aforementioned electronic device can perform the following operations of the aforementioned data processing method by executing machine-executable instructions: determining whether the target software is started based on its software state; if the target software is not started, starting the target software.
[0173] The processor in the aforementioned electronic device can perform the following operations of the aforementioned data processing method by executing machine-executable instructions: if the software type of the aforementioned target software is a preset first type and the aforementioned data processing method is a data batch processing operation, during the startup process of the target software, the window handle of the sub-window to be displayed during the startup process of the target software is searched through a preset application interface; the sub-window to be displayed is hidden through the window handle.
[0174] The above data processing method includes: data batch processing operation; the processor in the above electronic device can implement the following operations of the above data processing method by executing machine-executable instructions: if the software type of the target software is a preset first type, the target communication method is determined to be socket communication; if the software type of the target software is a preset second type, the target communication method is determined to be communication through the server of the target software.
[0175] The above data processing method includes: data batch processing operation; the above target communication method includes socket communication method; the processor in the above electronic device can implement the following operations of the above data processing method by executing machine-executable instructions: sending data processing instructions to the target software through a preset first socket to control the target software to perform batch conversion operations on the format and / or content of the target data, obtain conversion results, and return conversion results; receiving the conversion results returned by the target software.
[0176] The processor in the aforementioned electronic device can perform the following operations of the aforementioned data processing method by executing machine-executable instructions: acquiring the software status of the target software and the processing progress of the target software for the target data in real time or periodically through the first socket; if the software status of the target software is a crash state, displaying the query information of the target software; the query information is used to: ask whether to restart the target software.
[0177] The processor in the aforementioned electronic device, by executing machine-executable instructions, can perform the following operations of the aforementioned data processing method: determining whether target data satisfying specified conditions is found; wherein, the specified conditions include specified format or specified content; if target data satisfying the specified conditions is not found, determining that the target data needs to be converted, and executing the step of sending data processing instructions to the target software through a preset first socket; if target data satisfying the specified conditions is found, determining that the target data does not need to be converted, and using the found target data satisfying the specified conditions as the conversion result.
[0178] The aforementioned data processing method includes: batch data processing operation; the aforementioned target communication method includes: communication via the server of the target software; the processor in the aforementioned electronic device, by executing machine-executable instructions, can implement the following operations of the aforementioned data processing method: obtaining the interpreter program of the target software through the installation path of the target software; running a preset script file through the interpreter program to register a second socket through the script file; wherein, the second socket is used to: occupy an idle port to run the first server of the target software; send data processing instructions to the first server to control the target software to perform batch conversion operations on the format and / or content of the target data through the first server, obtain conversion results, and return conversion results; receive the conversion results returned by the target software.
[0179] The processor in the aforementioned electronic device can perform the following operations of the aforementioned data processing method by executing machine-executable instructions: monitoring the working status of the target software through a first server and returning the monitored status information of the target software; receiving the status information of the target software returned by the first server.
[0180] The above data processing method includes: data writing; the processor in the above electronic device can perform the following operations of the above data processing method by executing machine-executable instructions: if the software type of the target software is a preset first type, the target communication method is determined to be handle communication method; if the software type of the target software is a preset second type, the target communication method is determined to be socket communication method.
[0181] The aforementioned data processing method includes: data writing; the aforementioned target communication method includes handle communication; the processor in the aforementioned electronic device, by executing machine-executable instructions, can implement the following operations of the aforementioned data processing method: obtaining the software process of the target software, obtaining the listener window handle of the target software through the software process; obtaining the listener window of the target software through the listener window handle; sending data processing instructions to a specified script of the target software through the listener window, so as to control the writing of target data into the target software through the specified script.
[0182] The aforementioned data processing method includes: data writing; the aforementioned target communication method includes socket communication; the processor in the aforementioned electronic device, by executing machine-executable instructions, can implement the following operations of the aforementioned data processing method: detecting the target port occupied by the process corresponding to the target software; sending a data writing command written in the first language to the target port through a preset third socket; if the target port receives the data writing command written in the first language, and the process of the target software receives the data writing instruction at the target port, executing the writing of target data into the target software.
[0183] The above method also includes: if the target port does not receive data write commands written in the first language, sending data write commands written in the second language to the process window corresponding to the target software.
[0184] The processor in the aforementioned electronic device, by executing machine-executable instructions, can implement the following operations of the aforementioned data processing method: If the software version information includes multiple types, a thread is established for each type of software version information, so that a manager corresponding to each software version information is established through each thread, and the following steps of the aforementioned data processing method are executed through the manager: confirming that the target software indicated by the software version information corresponding to the manager has started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; controlling the target software to process the target data according to the data processing method through the target communication method, and obtaining the processed target data.
[0185] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the above-described data processing method.
[0186] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to execute the following operations in the aforementioned data processing method: receiving data processing instructions; determining the target data to be processed, the data processing method, and software version information based on the data processing instructions; wherein, the data processing method includes data batch processing operations and / or data writing; the software version information indicates the software type and software version of the target software used to process the target data; confirming that the target software indicated by the software version information has started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; and controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data.
[0187] The above method determines the communication method between the external software and the target software based on the data processing method and the type of the target software during the interaction process. This allows the external software and the target software to communicate directly without the need for additional plugins, thus avoiding any impact on the software's performance and reducing the complexity of communication operations. In addition, the data processing method using batch processing operations efficiently and accurately processes the software data, saving labor and time costs and improving data processing efficiency.
[0188] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be executed to perform the following operations in the aforementioned data processing method: acquiring target data to be processed; determining the software type of the target software processing the target data based on the data type of the target data; detecting the registry and software installation path in the specified device to determine at least one available version of the target software and displaying the version identifier of the at least one available version; and determining the software version of the target software in response to the selection of the first version identifier in the version identifier.
[0189] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to perform the following operations in the aforementioned data processing method by executing the machine-executable instructions: determining the current working status of each software based on the pre-recorded processing progress of each software on historical data; wherein, the current working status indicates whether there is unprocessed data; and displays the current working status of each software.
[0190] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to perform the following operations in the aforementioned data processing method by executing the machine-executable instructions: determining whether the target software is started based on the software state of the target software; if the target software is not started, starting the target software.
[0191] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to execute the following operations in the aforementioned data processing method: if the software type of the aforementioned target software is a preset first type and the aforementioned data processing method is a data batch processing operation, during the startup process of the target software, the window handle of the sub-window to be displayed during the startup process of the target software is searched through a preset application interface; the sub-window to be displayed is hidden through the window handle.
[0192] The above data processing method includes: data batch processing operation; machine-executable instructions stored in the above machine-readable storage medium, by executing the machine-executable instructions, the following operations in the above data processing method can be realized: if the software type of the target software is a preset first type, the target communication method is determined to be socket communication; if the software type of the target software is a preset second type, the target communication method is determined to be communication through the server of the target software.
[0193] The above data processing method includes: data batch processing operation; the above target communication method includes socket communication; the above machine-executable instructions stored in the machine-readable storage medium, by executing the machine-executable instructions, can realize the following operations in the above data processing method: sending data processing instructions to the target software through a preset first socket to control the target software to perform batch conversion operations on the format and / or content of the target data, obtain conversion results, and return the conversion results; receiving the conversion results returned by the target software.
[0194] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to execute the following operations in the aforementioned data processing method: real-time or periodic acquisition of the software status of the target software and the processing progress of the target software for the target data through the first socket; if the software status of the target software is a crash state, displaying the query information of the target software; the query information is used to: inquire whether to restart the target software.
[0195] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to perform the following operations in the aforementioned data processing method by executing the machine-executable instructions: determining whether target data that meets specified conditions is found; wherein, the specified conditions include specified format or specified content; if target data that meets the specified conditions is not found, determining that the target data needs to be converted, and executing the step of sending data processing instructions to the target software through a preset first socket; if target data that meets the specified conditions is found, determining that the target data does not need to be converted, and using the found target data that meets the specified conditions as the conversion result.
[0196] The aforementioned data processing method includes: batch data processing operations; the aforementioned target communication method includes: communication via the server of the target software; the aforementioned machine-executable instructions stored in the machine-readable storage medium, by executing the machine-executable instructions, can realize the following operations in the aforementioned data processing method: obtaining the interpreter program of the target software through the installation path of the target software; running a preset script file through the interpreter program to register a second socket through the script file; wherein, the second socket is used to: occupy an idle port to run the first server of the target software; send data processing instructions to the first server to control the target software to perform batch conversion operations on the format and / or content of the target data through the first server, obtain conversion results, and return the conversion results; receive the conversion results returned by the target software.
[0197] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to perform the following operations in the aforementioned data processing method by executing the machine-executable instructions: monitoring the working status of the target software through the first server and returning the monitored status information of the target software; receiving the status information of the target software returned by the first server.
[0198] The above data processing method includes: data writing; machine-executable instructions stored in the above machine-readable storage medium, by executing the machine-executable instructions, the following operations in the above data processing method can be realized: if the software type of the target software is a preset first type, the target communication method is determined to be handle communication mode; if the software type of the target software is a preset second type, the target communication mode is determined to be socket communication mode.
[0199] The above data processing method includes: data writing; the above target communication method includes handle communication; the above machine-executable instructions stored in the machine-readable storage medium, by executing the machine-executable instructions, can realize the following operations in the above data processing method: obtaining the software process of the target software, obtaining the listener window handle of the target software through the software process; obtaining the listener window of the target software through the listener window handle; sending data processing instructions to a specified script of the target software through the listener window, so as to control the writing of target data into the target software through the specified script.
[0200] The above data processing method includes: data writing; the above target communication method includes socket communication; the above machine-executable instructions stored in the machine-readable storage medium, by executing the machine-executable instructions, can realize the following operations in the above data processing method: detecting the target port occupied by the process corresponding to the target software; sending a data writing command written in the first language to the target port through a preset third socket; if the target port receives the data writing command written in the first language, and the process of the target software receives the data writing instruction at the target port, executing the writing of target data into the target software.
[0201] The above method also includes: if the target port does not receive data write commands written in the first language, sending data write commands written in the second language to the process window corresponding to the target software.
[0202] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be used to execute the following operations in the aforementioned data processing method: If the software version information includes multiple types, a thread is established for each type of software version information to create a manager corresponding to each software version information through each thread. The manager then executes the following steps of the aforementioned data processing method: confirming that the target software indicated by the software version information corresponding to the manager has started; determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software; and controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data.
[0203] The computer program products of the data processing methods, apparatus, and electronic devices provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementations, please refer to the method embodiments, which will not be repeated here.
[0204] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0205] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0206] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0207] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0208] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data processing method, characterized in that, The method includes: The system receives a data processing instruction and determines the target data to be processed, the data processing method, and the software version information based on the instruction. The data processing method includes data batch processing and / or data writing. The software version information indicates the software type and software version of the target software used to process the target data. Confirm that the target software indicated by the software version information has started; Based on the data processing method and the software type of the target software, determine the target communication method for communicating with the target software; Through the target communication method, the target software is controlled to process the target data according to the data processing method to obtain the processed target data; The step of controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data includes: If the data processing method includes batch data processing operations, and the target communication method includes communication via the server of the target software, then the following steps are performed: Obtain the interpreter program of the target software through the installation path of the target software; The interpreter program runs a preset script file to register a second socket; wherein the second socket is used to: occupy an idle port to run the target software on a first server; The data processing instructions are sent to the first server so that the first server controls the target software to perform batch conversion operations on the format and / or content of the target data, obtain conversion results, and return the conversion results; Receive the conversion result returned by the target software.
2. The method according to claim 1, characterized in that, Prior to the step of receiving data processing instructions, the method further includes: Obtain the target data to be processed, and based on the data type of the target data, determine the software type of the target software that processes the target data; Detect the registry and software installation path in the specified device, determine at least one available version of the target software, and display the version identifier of the at least one available version; In response to the selection of the first version identifier in the version identifier, the software version of the target software is determined.
3. The method according to claim 1, characterized in that, After the step of receiving data processing instructions, the method further includes: Based on the pre-recorded processing progress of each software on historical data, the current working status of each software is determined; wherein, the current working status indicates whether there is any unprocessed data. This displays the current working status of each software program.
4. The method according to claim 1, characterized in that, The steps to confirm the startup of the target software indicated by the software version information include: Based on the software state of the target software, determine whether the target software is started; If the target software is not started, start the target software.
5. The method according to claim 4, characterized in that, The method further includes: If the target software is of a preset first type and the data processing method is the data batch processing operation, during the startup process of the target software, the window handle of the sub-window to be displayed during the startup process of the target software is searched through a preset application interface; The child window to be displayed is hidden using the window handle.
6. The method according to claim 1, characterized in that, The data processing method includes: data batch processing operation; The step of determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software includes: If the target software's software type is a preset first type, then the target communication method is determined to be a socket communication method; If the target software is of a preset second type, the target communication method is determined to be a communication method through the server of the target software.
7. The method according to claim 1, characterized in that, The step of controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data further includes: If the data processing method includes batch data processing operations, and the target communication method includes socket communication, then the following steps are performed: The data processing instructions are sent to the target software via a preset first socket to control the target software to perform batch conversion operations on the format and / or content of the target data, obtain the conversion results, and return the conversion results. Receive the conversion result returned by the target software.
8. The method according to claim 7, characterized in that, After the step of sending the data processing instructions to the target software via a preset first socket, the method further includes: The software status of the target software and the processing progress of the target software for the target data can be obtained in real time or periodically through the first socket. If the target software is in a crash state, a query message is displayed; the query message is used to ask whether to restart the target software.
9. The method according to claim 7, characterized in that, The step of sending the data processing instructions to the target software via a preset first socket includes: Determine whether target data that meets specified conditions has been found; wherein, the specified conditions include specified format or specified content; If the target data that meets the specified conditions cannot be found, it is determined that the target data needs to be converted, and the step of sending the data processing instruction to the target software through the preset first socket is executed. If target data that meets the specified conditions is found, and it is determined that the target data does not require conversion, the found target data that meets the specified conditions is used as the conversion result.
10. The method according to claim 1, characterized in that, After the step of sending the data processing instruction to the first server, the method further includes: The first server monitors the working status of the target software and returns the monitored status information of the target software. Receive the status information of the target software returned by the first server.
11. The method according to claim 1, characterized in that, If the data processing method includes: data writing; The step of determining the target communication method for communicating with the target software based on the data processing method and the software type of the target software includes: If the target software's software type is a preset first type, then the target communication method is determined to be a handle communication method; If the target software is of a preset second type, the target communication method is determined to be a socket communication method.
12. The method according to claim 1, characterized in that, If the data processing method includes: data writing; and the target communication method includes handle communication; The step of controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data includes: Obtain the software process of the target software, and obtain the listener window handle of the target software through the software process; Obtain the listener window of the target software through the listener window handle; The data processing instructions are sent to a designated script in the target software through the listener window, so that the target data can be written into the target software through the designated script.
13. The method according to claim 1, characterized in that, If the data processing method includes: data writing; and the target communication method includes socket communication; The step of controlling the target software to process the target data according to the data processing method through the target communication method to obtain the processed target data includes: Detect the target port occupied by the process corresponding to the target software; Send a data write command written in the first language to the target port through a preset third socket; If the target port receives a data write command written in the first language, and the process of the target software receives the data write instruction on the target port, it executes to write the target data into the target software.
14. The method according to claim 13, characterized in that, The method further includes: If the target port does not receive the data write command written in the first language, send the data write command written in the second language to the process window corresponding to the target software.
15. The method according to claim 1, characterized in that, After receiving a data processing instruction and determining the target data to be processed, the data processing method, and the software version information based on the data processing instruction, the method further includes: If the software version information includes multiple types, a thread is created for each type of software version information, and a manager corresponding to each software version information is created through each thread. The following steps as described in claim 1 are then executed through the manager: Confirm that the target software indicated by the software version information corresponding to the manager has started; Based on the data processing method and the software type of the target software, determine the target communication method for communicating with the target software; The target software is controlled to process the target data according to the data processing method through the target communication method, so as to obtain the processed target data.
16. A data processing apparatus, characterized in that, The device includes: The first information determination module is used to receive data processing instructions and determine the target data to be processed, the data processing method, and the software version information based on the data processing instructions; wherein, the data processing method includes data batch processing operation and / or data writing; the software version information indicates the software type and software version of the target software used to process the target data; The second information determination module is used to confirm the startup of the target software indicated by the software version information; A communication method determination module is used to determine a target communication method for communicating with the target software based on the data processing method and the software type of the target software. The data processing module is used to control the target software to process the target data according to the data processing method through the target communication method, so as to obtain the processed target data; A data processing module is configured to, if the data processing method includes batch data processing operations and the target communication method includes communication via the server of the target software, execute the following steps: obtain the interpreter program of the target software through the installation path of the target software; run a preset script file through the interpreter program to register a second socket through the script file; wherein the second socket is used to: occupy an idle port to run a first server of the target software; send the data processing instructions to the first server to control the target software to perform batch conversion operations on the format and / or content of the target data through the first server, obtain conversion results, and return the conversion results; and receive the conversion results returned by the target software.
17. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the data processing method according to any one of claims 1-15.
18. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the data processing method according to any one of claims 1-15.
Citation Information
Patent Citations
Three-dimensional model data processing system
CN106600700A
Data transmission method and device
CN114745432A
