WO2024083109A1 - 文件还原度的评估方法、装置、存储介质和设备 - Google Patents
文件还原度的评估方法、装置、存储介质和设备 Download PDFInfo
- Publication number
- WO2024083109A1 WO2024083109A1 PCT/CN2023/124908 CN2023124908W WO2024083109A1 WO 2024083109 A1 WO2024083109 A1 WO 2024083109A1 CN 2023124908 W CN2023124908 W CN 2023124908W WO 2024083109 A1 WO2024083109 A1 WO 2024083109A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- task
- sketch
- layer image
- restoration
- Prior art date
Links
- 238000011156 evaluation Methods 0.000 title claims abstract description 14
- 238000000034 method Methods 0.000 claims abstract description 51
- 238000009877 rendering Methods 0.000 claims abstract description 23
- 230000015654 memory Effects 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000008676 import Effects 0.000 abstract description 6
- 238000012360 testing method Methods 0.000 description 6
- 238000012854 evaluation process Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 238000004379 similarity theory Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1435—Saving, restoring, recovering or retrying at system level using file system or storage system metadata
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
Definitions
- the present application relates to the field of file testing, and in particular to a method, device, storage medium and equipment for evaluating the degree of file restoration.
- the Mastergo application software is an existing product design tool that has the function of viewing files created by the Sketch application software (abbreviated as sketch files), that is, the Mastergo application software has the ability to restore sketch files.
- sketch files the file restoration capability of the Mastergo application software
- the existing file comparison method requires a lot of time and reduces the evaluation efficiency of the file restoration capability of the Mastergo application software.
- the present application provides a method, apparatus, storage medium and device for evaluating the degree of file restoration, with the aim of improving the evaluation efficiency of the file restoration capability of the Mastergo application software.
- a method for evaluating the degree of file restoration comprising:
- the preset steps include: parsing the sketch file corresponding to the task to obtain a first layer image; converting the format of the sketch file corresponding to the task to obtain an mg file; generating the execution result of the task based on the first layer image and the mg file;
- the process further includes:
- the status of each task is set to be executed, and the status of each task is recorded in a preset task status table.
- the method further includes:
- the status of the task recorded in the preset task status table is updated to rendering completed.
- obtaining the restoration degree of the sketch file corresponding to each task based on the first layer image and the second layer image belonging to the same task includes:
- the structural similarity index between the first layer image and the second layer image in each storage path is calculated in sequence
- the structural similarity index of each storage path is identified as the restoration degree of the sketch file to which each storage path belongs.
- the method further includes:
- the restoration degree comparison report is sent to the front end, so that the front end displays the restoration degree comparison report to the user through a preset interface.
- the method further includes:
- the status of the task recorded in the preset task status table is updated to comparison completed.
- a device for evaluating the degree of restoration of a file comprising:
- a file acquisition unit used to acquire multiple sketch files sent by the front end
- a task creation unit used for creating a task corresponding to each of the sketch files
- the task execution unit is used to distribute each of the tasks to each proxy node in a preset cluster, so that each of the proxy nodes executes the task obtained by the proxy node itself according to preset steps;
- the preset steps include: parsing the sketch file corresponding to the task to obtain a first layer image; converting the format of the sketch file corresponding to the task to obtain an mg file; generating the execution result of the task based on the first layer image and the mg file;
- a file rendering unit used for rendering the mg file shown in the execution result sent by each of the proxy nodes to obtain a second layer image of each of the tasks;
- the restoration degree calculation unit is used to obtain the restoration degree of the sketch file corresponding to each task based on the first layer image and the second layer image belonging to the same task.
- the report display unit is used to: construct a restoration degree comparison report based on the file names of the sketch files and the restoration degree of each sketch file; send the restoration degree comparison report to the front end so that the front end displays the restoration degree comparison report to the user through a preset interface.
- a computer-readable storage medium includes a stored program, wherein the program executes the file restoration degree evaluation method when executed by a processor.
- a device for evaluating the degree of file restoration comprising: a processor, a memory and a bus; the processor and the memory are connected via the bus;
- the memory is used to store programs, and the processor is used to run programs, wherein the program executes the method for evaluating the degree of file restoration when the program is run by the processor.
- the technical solution provided by the present application obtains multiple sketch files sent by the front end and creates tasks corresponding to each sketch file.
- Each task is distributed to each proxy node in the preset cluster so that each proxy node executes the task obtained by the proxy node itself according to the preset steps.
- the mg file shown in the execution result sent by each proxy node is rendered to obtain the second layer image of each task.
- the restoration degree of the sketch file corresponding to each task is obtained.
- the present application only requires the user to upload the sketch file to obtain the restoration degree of the sketch file. There is no need for manual participation in the image comparison process and the file import process, which reduces time and labor costs, and effectively improves the evaluation efficiency of the file restoration capability of the Mastergo application software.
- FIG1 is a schematic diagram of a flow chart of a method for evaluating the degree of file restoration provided in an embodiment of the present application
- FIG2 is a flow chart of another method for evaluating the degree of file restoration provided in an embodiment of the present application.
- FIG. 3 is a schematic diagram of the architecture of a device for evaluating the degree of file restoration provided in an embodiment of the present application.
- FIG1 a flowchart of a method for evaluating the degree of file restoration provided in an embodiment of the present application is provided, which can be applied to the back end and includes the following steps.
- S101 receiving a test file package sent by a front end, and saving multiple sketch files indicated in the test file package to different storage paths.
- the test file package includes the sketch files uploaded by the user in batches, and the file name of each sketch file. Specifically, the user can upload multiple sketch files in batches through the task management webpage, and the so-called task management webpage is a specific form of the front end.
- the front end will call the preset data transmission interface and send the test file package constructed based on each sketch file to the back end.
- the status of each task can be recorded in a preset task status table, so that the user can easily query the progress of the restoration degree evaluation process of each sketch file.
- S103 Distribute each task to each proxy node in a preset cluster, so that each proxy node executes the task obtained by the proxy node itself according to preset steps.
- the preset cluster includes but is not limited to a macOS computer cluster (i.e., a computer cluster running a macOS operating system).
- a load balancer can be called to evenly distribute each task to each proxy node to ensure that the load workload of each proxy node is balanced to prevent individual tasks from being processed in a timely manner.
- the preset steps include: parsing the sketch file corresponding to the task to obtain a first layer image; converting the format of the sketch file corresponding to the task to obtain an mg file (in actual application, the mg file is a file that can be directly run by the Mastergo application software); based on the first layer image and the mg file, generating the execution result of the task.
- proxy node can specifically call a preset command line tool (such as sketchtool) to parse the sketch file corresponding to the task to obtain the first layer image.
- each proxy node can run its own pre-deployed background process to execute the preset steps mentioned above.
- the process of deploying a background process in the agent node may be as follows: pre-packaging a preset node file (i.e., a node.js file) as an executable file; create a preset installer (i.e., a .dmg file); and run the installer so that the executable file is registered as a background self-starting process of the macOS operating system through a property table file (plist).
- a preset node file i.e., a node.js file
- create a preset installer i.e., a .dmg file
- run the installer so that the executable file is registered as a background self-starting process of the macOS operating system through a property table file (plist).
- S104 Rendering the mg file shown in the execution result sent by each proxy node to obtain the second layer image of each task.
- the status of the task recorded in the preset task status table is updated to rendering completed, so as to record the progress of the restoration degree evaluation process of the sketch file corresponding to the task.
- S105 Save the first layer image and the second layer image belonging to the same task to the storage path of the sketch file corresponding to the task.
- the first layer image and the second layer image belonging to the same task are saved in the storage path of the sketch file corresponding to the task, so that subsequent users can easily check the first layer image and the second layer image associated with the same sketch file.
- S106 According to the preset number of the storage path from small to large, the structural similarity (SSIM) index between the first layer image and the second layer image in each storage path is calculated in sequence.
- SSIM structural similarity
- x represents the first layer image
- y represents the second layer image
- ⁇ x represents the average value of x
- ⁇ y represents the average value of y
- ⁇ xy represents the average value of y
- c 1 (k 1 L) 2
- c 2 (k 2 L) 2
- c 1 and c 2 both represent preset constants
- L represents the pixel value
- k 1 and k 2 preset coefficients.
- the value range of the structural similarity index is [-1,1], that is, when the first layer image and the second layer image are exactly the same, the value of SSIM is equal to 1.
- the structural similarity index defines structural information from the perspective of image composition as an attribute that is independent of brightness and contrast and reflects the structure of objects in the scene, and models distortion as a combination of three different factors: brightness, contrast, and structure.
- the mean is used as an estimate of brightness, the standard deviation as an estimate of contrast, and the covariance as a measure of structural similarity.
- the SSIM index of each storage path is identified as the restoration degree of the sketch file to which each storage path belongs.
- the SSIM index as the restoration degree of the sketch file, is more objective and accurate than the restoration degree obtained by manual visual comparison.
- a restoration degree comparison report is constructed, and the restoration degree comparison report can also be saved in a preset database for subsequent users to review at any time.
- the status of the task recorded in the preset task status table is updated to comparison completed to record the progress of the restoration degree evaluation process of the sketch file corresponding to the task.
- S109 Sending the restoration degree comparison report to the front end, so that the front end displays the restoration degree comparison report to the user through a preset interface.
- the user only needs to upload a sketch file to obtain the restoration degree of the sketch file.
- S101 mentioned in the above embodiment is an optional implementation of the method for evaluating the degree of file restoration shown in the embodiment of the present application.
- S109 mentioned in the above embodiment is also an optional implementation of the method for evaluating the degree of file restoration shown in the embodiment of the present application.
- the process mentioned in the above embodiment can be summarized as the method described in Figure 2.
- FIG2 a flow chart of another method for evaluating the degree of file restoration provided in an embodiment of the present application is shown, which includes the following steps.
- S203 Distribute each task to each proxy node in the preset cluster, so that each proxy node executes the task obtained by the proxy node itself according to preset steps.
- the preset steps include: parsing the sketch file corresponding to the task to obtain a first layer image; converting the format of the sketch file corresponding to the task to obtain an mg file; and generating the execution result of the task based on the first layer image and the mg file.
- the user only needs to upload a sketch file to obtain the restoration degree of the sketch file.
- the embodiment of the present application also provides a device for evaluating the degree of file restoration.
- FIG3 it is a schematic diagram of the architecture of a device for evaluating the degree of file restoration provided in an embodiment of the present application, including the units shown below.
- the file acquisition unit 100 is used to acquire multiple sketch files sent by the front end.
- the task creation unit 200 is used to create a task corresponding to each sketch file.
- the task creation unit 200 is further used to: set the status of each task to be executed, and record the status of each task in a preset task status table.
- the task execution unit 300 is used to distribute each task to each proxy node in a preset cluster so that each proxy node executes the task obtained by the proxy node itself according to preset steps; the preset steps include: parsing the sketch file corresponding to the task to obtain a first layer image; converting the format of the sketch file corresponding to the task to obtain an mg file; generating the execution result of the task based on the first layer image and the mg file.
- the file rendering unit 400 is used to render the mg file shown in the execution result sent by each proxy node to obtain the second layer image of each task.
- the file rendering unit 400 is further used for: for each task, after determining that the second layer image of the task is obtained, updating the status of the task recorded in a preset task status table to rendering completed.
- the restoration degree calculation unit 500 is used to obtain the restoration degree of the sketch file corresponding to each task based on the first layer image and the second layer image belonging to the same task.
- the restoration degree calculation unit 500 is specifically used to: save each sketch file sent by the front end to different storage paths in advance; save the first layer image and the second layer image belonging to the same task to the storage path of the sketch file corresponding to the task; calculate the structural similarity index between the first layer image and the second layer image in each storage path in order from small to large according to the preset number of the storage path; identify the structural similarity index of each storage path as the restoration degree of the sketch file to which each storage path belongs.
- the report display unit 600 is used to: construct a restoration degree comparison report based on the file names of each sketch file and the restoration degree of each sketch file; and send the restoration degree comparison report to the front end so that the front end displays the restoration degree comparison report to the user through a preset interface.
- the report display unit 600 is further used to: for each task, after determining the restoration degree of the sketch file corresponding to the task and incorporating it into the restoration degree comparison report, update the status of the task recorded in the preset task status table to comparison completed.
- the user only needs to upload a sketch file to obtain the restoration degree of the sketch file.
- the present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the file restoration degree evaluation method provided by the present application.
- the present application also provides a device for evaluating the degree of file restoration, including: a processor, a memory, and a bus.
- the processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is running, the method for evaluating the degree of file restoration provided by the present application is executed, including the following steps:
- the preset steps include: parsing the sketch file corresponding to the task to obtain a first layer image; converting the format of the sketch file corresponding to the task to obtain an mg file; generating the execution result of the task based on the first layer image and the mg file;
- the process further includes:
- the status of each task is set to be executed, and the status of each task is recorded in a preset task status table.
- the method further includes:
- the status of the task recorded in the preset task status table is updated to rendering completed.
- obtaining the restoration degree of the sketch file corresponding to each task based on the first layer image and the second layer image belonging to the same task includes:
- the structural similarity index between the first layer image and the second layer image in each storage path is calculated in sequence
- the structural similarity index of each storage path is identified as the restoration degree of the sketch file to which each storage path belongs.
- the method further includes:
- the restoration degree comparison report is sent to the front end, so that the front end displays the restoration degree comparison report to the user through a preset interface.
- the method further includes:
- the status of the task recorded in the preset task status table is updated to comparison completed.
- the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device.
- a computing device which can be a personal computer, server, mobile computing device or network device, etc.
- the aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Library & Information Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本申请公开了一种文件还原度的评估方法、装置、存储介质和设备,该方法为:获取前端发送的多个sketch文件;创建与每个sketch文件对应的任务;将各个任务分发给预设集群中的各个代理节点,以使每个代理节点按照预设步骤执行代理节点自身所获得的任务;对各个代理节点发送的执行结果所示的mg文件进行渲染,得到各个任务的第二图层图像;基于归属于同一任务的第一图层图像和第二图层图像,获得与每个任务对应的sketch文件的还原度。该方法只需用户上传sketch文件,便可获得sketch文件的还原度,无需人工参与图像对比过程、文件导入过程,减少了时间成本和人力成本,使得文件还原能力的评估效率得到有效提高。
Description
本申请要求于2022年10月17日提交中国专利局、申请号为202211265059.4、发明名称为“文件还原度的评估方法、装置、存储介质和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及文件测试领域,尤其涉及一种文件还原度的评估方法、装置、存储介质和设备。
Mastergo应用软件为现有的一种产品设计工具,其具有查看Sketch应用软件所制作的文件(简述为sketch文件)的功能,即Mastergo应用软件具备还原sketch文件的能力。为了评估Mastergo应用软件的文件还原能力(即Mastergo应用软件渲染sketch文件所得的图像,与Sketch应用软件渲染sketch文件所得的图像之间的差异),需要人工将海量sketch文件分别导入至Mastergo应用软件和Sketch应用软件中,并由人工从视觉角度来对比Mastergo应用软件和Sketch应用软件各自渲染同一sketch文件所得到的结果是否一致,从而实现对Mastergo应用软件的文件还原能力的评估过程。
受限于人力因素以及海量sketch文件的测试场景,现有的文件对比方式需要花费较多时间成本,使得Mastergo应用软件的文件还原能力的评估效率降低。
发明内容
本申请提供了一种文件还原度的评估方法、装置、存储介质和设备,目的在于提高Mastergo应用软件的文件还原能力的评估效率。
为了实现上述目的,本申请提供了以下技术方案:
一种文件还原度的评估方法,包括:
获取前端发送的多个sketch文件;
创建与每个所述sketch文件对应的任务;
将各个所述任务分发给预设集群中的各个代理节点,以使每个所述代理节点按照预设步骤执行所述代理节点自身所获得的所述任务;所述预设步骤包括:对与所述任务对应的sketch文件进行解析,得到第一图层图像;对与所述任务对应的sketch文件进行格式转换,得到mg文件;基于所述第一图层图像和所述mg文件,生成所述任务的执行结果;
对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像;
基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度。
可选的,所述创建与每个所述sketch文件对应的任务之后,还包括:
将各个所述任务的状态设置为待执行,并将各个所述任务的状态,记录到预设的任务状态表中。
可选的,所述对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像之后,还包括:
对于每个所述任务,在确定得到所述任务的第二图层图像后,将预设的任务状态表中记录的所述任务的状态更新为渲染完成。
可选的,所述基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度,包括:
预先将所述前端发送的各个所述sketch文件,保存到不同的存储路径中;
将归属于同一所述任务的第一图层图像和第二图层图像,保存到与所述任务对应的sketch文件的存储路径中;
按照存储路径的预设编号由小到大的顺序,依次计算得出各个存储路径中第一图层图像和第二图层图像之间的结构相似性指数;
将每个存储路径的结构相似性指数,标识为每个存储路径所属sketch文件的还原度。
可选的,所述基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度之后,还包括:
基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表;
将所述还原度对比报表发送给所述前端,以使所述前端通过预设界面向用户展示所述还原度对比报表。
可选的,所述基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表之后,还包括:
对于每个所述任务,在确定与所述任务对应的sketch文件的还原度,被纳入到所述还原度对比报表后,将预设的任务状态表中记录的所述任务的状态更新为对比完成。
一种文件还原度的评估装置,包括:
文件获取单元,用于获取前端发送的多个sketch文件;
任务创建单元,用于创建与每个所述sketch文件对应的任务;
任务执行单元,用于将各个所述任务分发给预设集群中的各个代理节点,以使每个所述代理节点按照预设步骤执行所述代理节点自身所获得的所述任务;所述预设步骤包括:对与所述任务对应的sketch文件进行解析,得到第一图层图像;对与所述任务对应的sketch文件进行格式转换,得到mg文件;基于所述第一图层图像和所述mg文件,生成所述任务的执行结果;
文件渲染单元,用于对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像;
还原度计算单元,用于基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度。
可选的,还包括:
报表展示单元,用于:基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表;将所述还原度对比报表发送给所述前端,以使所述前端通过预设界面向用户展示所述还原度对比报表。
一种计算机可读存储介质,所述计算机可读存储介质包括存储的程序,其中,所述程序被处理器运行时执行所述的文件还原度的评估方法。
一种文件还原度的评估设备,包括:处理器、存储器和总线;所述处理器与所述存储器通过所述总线连接;
所述存储器用于存储程序,所述处理器用于运行程序,其中,所述程序被处理器运行时执行所述的文件还原度的评估方法。
本申请提供的技术方案,获取前端发送的多个sketch文件,创建与每个sketch文件对应的任务。将各个任务分发给预设集群中的各个代理节点,以使每个代理节点按照预设步骤执行代理节点自身所获得的任务。对各个代理节点发送的执行结果所示的mg文件进行渲染,得到各个任务的第二图层图像。基于归属于同一任务的第一图层图像和第二图层图像,获得与每个任务对应的sketch文件的还原度。本申请只需用户上传sketch文件,便可获得sketch文件的还原度,无需人工参与图像对比过程、文件导入过程,减少了时间成本和人力成本,使得Mastergo应用软件的文件还原能力的评估效率得到有效提高。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种文件还原度的评估方法的流程示意图;
图2为本申请实施例提供的另一种文件还原度的评估方法的流程示意图;
图3为本申请实施例提供的一种文件还原度的评估装置的架构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
如图1所示,为本申请实施例提供的一种文件还原度的评估方法的流程示意图,可应用于后端,包括如下所示步骤。
S101:接收前端发送的测试文件包,并将测试文件包所示的多个sketch文件,保存到不同的存储路径中。
其中,测试文件包包括用户批量上传的各个sketch文件,以及每个sketch文件的文件名。具体的,用户可通过任务管理网页批量上传多个sketch文件,所谓的任务管理网页即为前端的一种具体表现形式。
需要说明的是,前端在接收到用户批量上传的多个sketch文件后,会调用预设数据传输接口,将基于各个sketch文件构建得到的测试文件包,发送给后端。
S102:创建与每个sketch文件对应的任务。
其中,任务创建的具体实现过程,为本领域技术人员所熟悉的公知常识,这里不再赘述。
可选的,在创建与每个sketch文件对应的任务后,还可以将各个任务的状态,记录到预设的任务状态表中,能够方便用户查询各个sketch文件的还原度评估过程的进展情况。
S103:将各个任务分发给预设集群中的各个代理节点,以使每个代理节点按照预设步骤执行代理节点自身所获得的任务。
其中,预设集群包括但不限于为macos电脑集群(即运行macos操作系统的电脑集群)。一般来讲,预设集群中的每个代理节点,会定期访问后端,并从后端获取得到一个或多个任务。具体的,可以调用负载均衡器,将各个任务均衡地分发给各个代理节点,以确保每个代理节点的负载工作量均衡,防止个别任务无法及时处理。
在本申请实施例中,预设步骤包括:对与任务对应的sketch文件进行解析,得到第一图层图像;对与任务对应的sketch文件进行格式转换,得到mg文件(在实际应用中,mg文件为可被Mastergo应用软件直接运行的文件);基于第一图层图像和mg文件,生成任务的执行结果。
需要说明的是,代理节点具体可以调用预设的命令行工具(例如sketchtool),对与任务对应的sketch文件进行解析,得到第一图层图像。此外,每个代理节点均可以运行自身预先部署的后台进程,来执行上述提及的预设步骤。
具体的,对于运行macos操作系统的代理节点而言,在代理节点中部署后台进程的过程具体可以为:预先将预设的节点文件(即node.js文件),打包
为可执行文件;创建预设安装程序(即.dmg文件);运行安装程序,以使可执行文件通过属性表文件(plist)注册为macos操作系统的后台自启动进程。
S104:对各个代理节点发送的执行结果所示的mg文件进行渲染,得到各个任务的第二图层图像。
可选的,对于每个任务,在确定得到任务的第二图层图像后,将预设的任务状态表中记录的任务的状态更新为渲染完成,以记录与任务对应的sketch文件的还原度评估过程的进展情况。
S105:将归属于同一任务的第一图层图像和第二图层图像,保存到与任务对应的sketch文件的存储路径中。
其中,将归属于同一任务的第一图层图像和第二图层图像,保存到与任务对应的sketch文件的存储路径中,可方便后续用户查阅与同一sketch文件关联的第一图层图像和第二图层图像。
S106:按照存储路径的预设编号由小到大的顺序,依次计算得出各个存储路径中第一图层图像和第二图层图像之间的结构相似性(Structural Similarity,SSIM)指数。
其中,第一图层图像和第二图层图像之间的SSIM指数的具体计算过程,可参见公式(1)所示。
在公式(1)中,x代表第一图层图像,y代表第二图层图像,μx代表x的平均值,μy代表y的平均值,代表x的方差,代表y的方差,σxy代表x和y的协方差,c1=(k1L)2,c2=(k2L)2,且c1和c2均代表预设常数,L代表像素值,k1和k2代表预设系数。一般来讲,结构相似性指标的取值范围为[-1,1],即当第一图层图像和第二图层图像一模一样是,SSIM的值等于1。
作为结构相似性理论的实现,结构相似性指数从图像组成的角度将结构信息定义为独立于亮度、对比度的,反映场景中物体结构的属性,并将失真建模为亮度、对比度和结构三个不同因素的组合。用均值作为亮度的估计,标准差作为对比度的估计,协方差作为结构相似程度的度量。
S107:将每个存储路径的SSIM指数,标识为每个存储路径所属sketch文件的还原度。
其中,SSIM指数作为sketch文件的还原度,其相较于人工通过视觉比对所得到的还原度,更加客观准确。
S108:基于各个sketch文件的文件名,以及每个sketch文件的还原度,构建还原度对比报表。
其中,在基于各个sketch文件的文件名,以及每个sketch文件的还原度,构建还原度对比报表,还可以将还原度对比报表,保存到预设数据库中,以便后续用户随时查阅。
可选的,对于每个任务,在确定与任务对应的sketch文件的还原度,被纳入到还原度对比报表后,将预设的任务状态表中记录的任务的状态更新为对比完成,以记录与任务对应的sketch文件的还原度评估过程的进展情况。
S109:将还原度对比报表发送给前端,以使前端通过预设界面向用户展示还原度对比报表。
其中,基于还原度对比报表,用户能够清楚知道Mastergo应用软件的文件还原能力,从而实现对Mastergo应用软件的文件还原能力的评估。
综上所述,本实施例只需用户上传sketch文件,便可获得sketch文件的还原度,无需人工参与图像对比过程、文件导入过程,减少了时间成本和人力成本,使得Mastergo应用软件的文件还原能力的评估效率得到有效提高。
需要说明的是,上述实施例提及的S101,为本申请实施例所示文件还原度的评估方法的一种可选的实现方式。此外,上述实施例提及的S109,也为本申请实施例所示文件还原度的评估方法的一种可选的实现方式。为此,上述实施例提及的流程,可以概括为图2所述的方法。
如图2所示,为本申请实施例提供的另一种文件还原度的评估方法的流程示意图,包括如下所示步骤。
S201:获取前端发送的多个sketch文件。
S202:创建与每个sketch文件对应的任务。
S203:将各个任务分发给预设集群中的各个代理节点,以使每个代理节点按照预设步骤执行代理节点自身所获得的任务。
其中,预设步骤包括:对与任务对应的sketch文件进行解析,得到第一图层图像;对与任务对应的sketch文件进行格式转换,得到mg文件;基于第一图层图像和mg文件,生成任务的执行结果。
S204:对各个代理节点发送的执行结果所示的mg文件进行渲染,得到各个任务的第二图层图像。
S205:基于归属于同一任务的第一图层图像和第二图层图像,获得与每个任务对应的sketch文件的还原度。
综上所述,本实施例只需用户上传sketch文件,便可获得sketch文件的还原度,无需人工参与图像对比过程、文件导入过程,减少了时间成本和人力成本,使得Mastergo应用软件的文件还原能力的评估效率得到有效提高。
与上述本申请实施例提供的文件还原度的评估方法相对应,本申请实施例还提供了一种文件还原度的评估装置。
如图3所示,为本申请实施例提供的一种文件还原度的评估装置的架构示意图,包括如下所示单元。
文件获取单元100,用于获取前端发送的多个sketch文件。
任务创建单元200,用于创建与每个sketch文件对应的任务。
可选的,任务创建单元200还用于:将各个任务的状态设置为待执行,并将各个任务的状态,记录到预设的任务状态表中。
任务执行单元300,用于将各个任务分发给预设集群中的各个代理节点,以使每个代理节点按照预设步骤执行代理节点自身所获得的任务;预设步骤包括:对与任务对应的sketch文件进行解析,得到第一图层图像;对与任务对应的sketch文件进行格式转换,得到mg文件;基于第一图层图像和mg文件,生成任务的执行结果。
文件渲染单元400,用于对各个代理节点发送的执行结果所示的mg文件进行渲染,得到各个任务的第二图层图像。
可选的,文件渲染单元400还用于:对于每个任务,在确定得到任务的第二图层图像后,将预设的任务状态表中记录的任务的状态更新为渲染完成。
还原度计算单元500,用于基于归属于同一任务的第一图层图像和第二图层图像,获得与每个任务对应的sketch文件的还原度。
可选的,还原度计算单元500具体用于:预先将前端发送的各个sketch文件,保存到不同的存储路径中;将归属于同一任务的第一图层图像和第二图层图像,保存到与任务对应的sketch文件的存储路径中;按照存储路径的预设编号由小到大的顺序,依次计算得出各个存储路径中第一图层图像和第二图层图像之间的结构相似性指数;将每个存储路径的结构相似性指数,标识为每个存储路径所属sketch文件的还原度。
报表展示单元600,用于:基于各个sketch文件的文件名,以及每个sketch文件的还原度,构建还原度对比报表;将还原度对比报表发送给前端,以使前端通过预设界面向用户展示还原度对比报表。
可选的,报表展示单元600还用于:对于每个任务,在确定与任务对应的sketch文件的还原度,被纳入到还原度对比报表后,将预设的任务状态表中记录的任务的状态更新为对比完成。
综上所述,本实施例只需用户上传sketch文件,便可获得sketch文件的还原度,无需人工参与图像对比过程、文件导入过程,减少了时间成本和人力成本,使得Mastergo应用软件的文件还原能力的评估效率得到有效提高。
本申请还提供了一种计算机可读存储介质,计算机可读存储介质包括存储的程序,其中,程序执行上述本申请提供的文件还原度的评估方法。
本申请还提供了一种文件还原度的评估设备,包括:处理器、存储器和总线。处理器与存储器通过总线连接,存储器用于存储程序,处理器用于运行程序,其中,程序运行时执行上述本申请提供的文件还原度的评估方法,包括如下步骤:
获取前端发送的多个sketch文件;
创建与每个所述sketch文件对应的任务;
将各个所述任务分发给预设集群中的各个代理节点,以使每个所述代理节点按照预设步骤执行所述代理节点自身所获得的所述任务;所述预设步骤包括:对与所述任务对应的sketch文件进行解析,得到第一图层图像;对与所述任务对应的sketch文件进行格式转换,得到mg文件;基于所述第一图层图像和所述mg文件,生成所述任务的执行结果;
对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像;
基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度。
具体的,在上述实施例的基础上,所述创建与每个所述sketch文件对应的任务之后,还包括:
将各个所述任务的状态设置为待执行,并将各个所述任务的状态,记录到预设的任务状态表中。
具体的,在上述实施例的基础上,所述对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像之后,还包括:
对于每个所述任务,在确定得到所述任务的第二图层图像后,将预设的任务状态表中记录的所述任务的状态更新为渲染完成。
具体的,在上述实施例的基础上,所述基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度,包括:
预先将所述前端发送的各个所述sketch文件,保存到不同的存储路径中;
将归属于同一所述任务的第一图层图像和第二图层图像,保存到与所述任务对应的sketch文件的存储路径中;
按照存储路径的预设编号由小到大的顺序,依次计算得出各个存储路径中第一图层图像和第二图层图像之间的结构相似性指数;
将每个存储路径的结构相似性指数,标识为每个存储路径所属sketch文件的还原度。
具体的,在上述实施例的基础上,所述基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度之后,还包括:
基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表;
将所述还原度对比报表发送给所述前端,以使所述前端通过预设界面向用户展示所述还原度对比报表。
具体的,在上述实施例的基础上,所述基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表之后,还包括:
对于每个所述任务,在确定与所述任务对应的sketch文件的还原度,被纳入到所述还原度对比报表后,将预设的任务状态表中记录的所述任务的状态更新为对比完成。
本申请实施例方法所述的功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算设备可读取存储介质中。基于这样的理解,本申请实施例对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一台计算设备(可以是个人计算机,服务器,移动计算设备或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。
Claims (9)
- 一种文件还原度的评估方法,其特征在于,包括:获取前端发送的多个sketch文件;创建与每个所述sketch文件对应的任务;将各个所述任务分发给预设集群中的各个代理节点,以使每个所述代理节点按照预设步骤执行所述代理节点自身所获得的所述任务;所述预设步骤包括:对与所述任务对应的sketch文件进行解析,得到第一图层图像;对与所述任务对应的sketch文件进行格式转换,得到mg文件;基于所述第一图层图像和所述mg文件,生成所述任务的执行结果;对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像;预先将所述前端发送的各个所述sketch文件,保存到不同的存储路径中;将归属于同一所述任务的第一图层图像和第二图层图像,保存到与所述任务对应的sketch文件的存储路径中;按照存储路径的预设编号由小到大的顺序,依次计算得出各个存储路径中第一图层图像和第二图层图像之间的结构相似性指数;将每个存储路径的结构相似性指数,标识为每个存储路径所属sketch文件的还原度。
- 根据权利要求1所述的方法,其特征在于,所述创建与每个所述sketch文件对应的任务之后,还包括:将各个所述任务的状态设置为待执行,并将各个所述任务的状态,记录到预设的任务状态表中。
- 根据权利要求1所述的方法,其特征在于,所述对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像之后,还包括:对于每个所述任务,在确定得到所述任务的第二图层图像后,将预设的任务状态表中记录的所述任务的状态更新为渲染完成。
- 根据权利要求1所述的方法,其特征在于,所述基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度之后,还包括:基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表;将所述还原度对比报表发送给所述前端,以使所述前端通过预设界面向用户展示所述还原度对比报表。
- 根据权利要求4所述的方法,其特征在于,所述基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表之后,还包括:对于每个所述任务,在确定与所述任务对应的sketch文件的还原度,被纳入到所述还原度对比报表后,将预设的任务状态表中记录的所述任务的状态更新为对比完成。
- 一种文件还原度的评估装置,其特征在于,包括:文件获取单元,用于获取前端发送的多个sketch文件;任务创建单元,用于创建与每个所述sketch文件对应的任务;任务执行单元,用于将各个所述任务分发给预设集群中的各个代理节点,以使每个所述代理节点按照预设步骤执行所述代理节点自身所获得的所述任务;所述预设步骤包括:对与所述任务对应的sketch文件进行解析,得到第一图层图像;对与所述任务对应的sketch文件进行格式转换,得到mg文件;基于所述第一图层图像和所述mg文件,生成所述任务的执行结果;文件渲染单元,用于对各个所述代理节点发送的执行结果所示的mg文件进行渲染,得到各个所述任务的第二图层图像;还原度计算单元,用于基于归属于同一所述任务的第一图层图像和第二图层图像,获得与每个所述任务对应的sketch文件的还原度;所述还原度计算单元具体用于,预先将所述前端发送的各个所述sketch文件,保存到不同的存储路径中;将归属于同一所述任务的第一图层图像和第二图层图像,保存到与所述任务对应的sketch文件的存储路径中;按照存储路径的预设编号由小到大的顺序,依次计算得出各个存储路径中第一图层图像和 第二图层图像之间的结构相似性指数;将每个存储路径的结构相似性指数,标识为每个存储路径所属sketch文件的还原度。
- 根据权利要求6所述的装置,其特征在于,还包括:报表展示单元,用于:基于各个所述sketch文件的文件名,以及每个所述sketch文件的还原度,构建还原度对比报表;将所述还原度对比报表发送给所述前端,以使所述前端通过预设界面向用户展示所述还原度对比报表。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括存储的程序,其中,所述程序被处理器运行时执行权利要求1-5任一所述的文件还原度的评估方法。
- 一种文件还原度的评估设备,其特征在于,包括:处理器、存储器和总线;所述处理器与所述存储器通过所述总线连接;所述存储器用于存储程序,所述处理器用于运行程序,其中,所述程序被处理器运行时执行权利要求1-5任一所述的文件还原度的评估方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211265059.4 | 2022-10-17 | ||
CN202211265059.4A CN115328855B (zh) | 2022-10-17 | 2022-10-17 | 文件还原度的评估方法、装置、存储介质和设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024083109A1 true WO2024083109A1 (zh) | 2024-04-25 |
Family
ID=83915352
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/124908 WO2024083109A1 (zh) | 2022-10-17 | 2023-10-17 | 文件还原度的评估方法、装置、存储介质和设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115328855B (zh) |
WO (1) | WO2024083109A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115328855B (zh) * | 2022-10-17 | 2023-01-24 | 北京尽微致广信息技术有限公司 | 文件还原度的评估方法、装置、存储介质和设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170011012A1 (en) * | 2015-07-07 | 2017-01-12 | Adp, Llc | Automatic verification of graphic rendition of json data |
CN109389661A (zh) * | 2017-08-04 | 2019-02-26 | 阿里健康信息技术有限公司 | 一种动画文件转化方法及装置 |
CN112035772A (zh) * | 2020-07-27 | 2020-12-04 | 长沙市到家悠享网络科技有限公司 | 页面评估方法、装置及设备 |
CN114860521A (zh) * | 2022-04-23 | 2022-08-05 | 中电万维信息技术有限责任公司 | 一种ui界面还原度自动测试方法 |
CN115328855A (zh) * | 2022-10-17 | 2022-11-11 | 北京尽微致广信息技术有限公司 | 文件还原度的评估方法、装置、存储介质和设备 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109992518A (zh) * | 2019-04-10 | 2019-07-09 | 禄鹏 | Ui界面的检测方法、装置、电子设备及存储介质 |
US10938961B1 (en) * | 2019-12-18 | 2021-03-02 | Ndata, Inc. | Systems and methods for data deduplication by generating similarity metrics using sketch computation |
CN114741139A (zh) * | 2021-01-07 | 2022-07-12 | 腾讯科技(深圳)有限公司 | sketch图形文件的处理方法、装置、电子设备及存储介质 |
CN114756448A (zh) * | 2022-03-04 | 2022-07-15 | 上海极豆科技有限公司 | 一种用户界面的还原度自动测试系统和方法 |
CN114637636A (zh) * | 2022-03-23 | 2022-06-17 | 中国平安人寿保险股份有限公司 | 基于人工智能的ui界面校验方法、装置、设备及介质 |
-
2022
- 2022-10-17 CN CN202211265059.4A patent/CN115328855B/zh active Active
-
2023
- 2023-10-17 WO PCT/CN2023/124908 patent/WO2024083109A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170011012A1 (en) * | 2015-07-07 | 2017-01-12 | Adp, Llc | Automatic verification of graphic rendition of json data |
CN109389661A (zh) * | 2017-08-04 | 2019-02-26 | 阿里健康信息技术有限公司 | 一种动画文件转化方法及装置 |
CN112035772A (zh) * | 2020-07-27 | 2020-12-04 | 长沙市到家悠享网络科技有限公司 | 页面评估方法、装置及设备 |
CN114860521A (zh) * | 2022-04-23 | 2022-08-05 | 中电万维信息技术有限责任公司 | 一种ui界面还原度自动测试方法 |
CN115328855A (zh) * | 2022-10-17 | 2022-11-11 | 北京尽微致广信息技术有限公司 | 文件还原度的评估方法、装置、存储介质和设备 |
Also Published As
Publication number | Publication date |
---|---|
CN115328855B (zh) | 2023-01-24 |
CN115328855A (zh) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230144100A1 (en) | Method and apparatus for managing and controlling resource, device and storage medium | |
WO2024083109A1 (zh) | 文件还原度的评估方法、装置、存储介质和设备 | |
CN110956269B (zh) | 数据模型的生成方法、装置、设备以及计算机存储介质 | |
US20080189230A1 (en) | Determining compliance rates for probabilistic requests | |
WO2019085466A1 (zh) | 关联测试方法、系统、应用服务器及计算机可读存储介质 | |
CN111695876A (zh) | 审批流程处理方法、装置、设备及存储介质 | |
WO2021068113A1 (zh) | 时长统计方法、装置、电子设备和计算机可读介质 | |
CN107368407B (zh) | 信息处理方法和装置 | |
CN107436785B (zh) | 基于信息系统的Revit软件信息交互系统及交互方法 | |
CN115033377A (zh) | 基于集群服务器的服务资源预测方法、装置和电子设备 | |
CA3116547A1 (en) | Real-time workflow tracking | |
CN113051178A (zh) | 测试数据构造方法、装置、设备及介质 | |
CN112561690A (zh) | 信用卡分期业务接口的测试方法、系统、设备及存储介质 | |
CN115827646A (zh) | 索引配置方法、装置和电子设备 | |
CN116737535A (zh) | 接口测试方法、装置、计算机设备和存储介质 | |
CN115052037A (zh) | 客户端检测方法、装置、存储介质和设备 | |
CN114238292B (zh) | 数据清洗方法、装置、计算机设备、计算机可读存储介质 | |
CN111311041A (zh) | 一种数据抽取方法及设备和相关装置 | |
CN111159988A (zh) | 一种模型处理方法、装置、计算机设备及存储介质 | |
US11023487B2 (en) | Data replication for cloud based in-memory databases | |
CN112905427B (zh) | 一种数据处理方法和装置 | |
CN112596752B (zh) | 一种电子取证设备物联化方法及系统 | |
CN115221338B (zh) | 知识图谱构建方法及其系统、计算机设备 | |
US20240195752A1 (en) | Holistic measurement of microservice-based application resource consumption | |
CN110633293A (zh) | 离线计算的方法与装置、存储介质及计算机设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23879097 Country of ref document: EP Kind code of ref document: A1 |