Disclosure of Invention
According to one aspect of the present disclosure, the following technical solutions are provided:
a method of document monitoring, comprising: reading a first list to obtain a first identifier, wherein the first list comprises the first identifier of a first type of subfile included in the file; reading the second list, and acquiring a second identifier of the first type subfile in the second list according to the first identifier; acquiring the attribute of the data indexed by the second identifier; generating a first result according to the attribute of the data; and if the first result meets the first condition, triggering monitoring early warning.
Further, the file comprises at least one module file, and the module file comprises at least one first type subfile; and storing the corresponding relation between the module file and the first type of subfile in the first list.
Further, the reading the second list, and obtaining a second identifier of the first type subfile in the second list according to the first identifier includes: and reading the second list, and searching a second identifier of the first type of subfile in the second list according to the first identifier, wherein the second list comprises the corresponding relation between the first identifier and the second identifier.
Further, the obtaining of the attribute of the data indexed by the second identifier includes: searching the data corresponding to the second identifier in the second list; acquiring the size of the data according to the size attribute value of the data; the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the generating a first result according to the attribute of the data includes:
adding the sizes of all the data in the first type subfile to obtain the first result.
Further, if the first result satisfies the first condition, triggering a monitoring early warning, including: and if the first result is larger than a first threshold value, triggering monitoring early warning.
Further, the obtaining of the attribute of the data indexed by the second identifier includes: searching the data corresponding to the second identifier in the second list; acquiring the data type of the data according to the offset address of the data, wherein the data type at least comprises a first data type and a second data type; acquiring the size of data of a first data type in the data; the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the generating a first result according to the attribute of the data includes: and adding the sizes of all the data of the first data type to obtain a first result.
Further, if the first result satisfies the first condition, triggering a monitoring early warning, including: and if the first result is larger than a second threshold value, triggering monitoring early warning.
Further, the obtaining of the attribute of the data indexed by the second identifier includes: searching the data corresponding to the second identifier in the second list; acquiring the name of the data; the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the generating a first result according to the attribute of the data includes: comparing names of data in at least two of the first type subfiles and outputting duplicate ones of the names.
Further, if the first result satisfies the first condition, triggering a monitoring early warning, including: and if the number of the repeated names is more than 0, triggering monitoring early warning.
Further, the obtaining of the attribute of the data indexed by the second identifier includes: searching the data corresponding to the second identifier in the second list; acquiring the size of the data according to the size attribute value of the data; acquiring a data segment to which the data belongs according to the offset address of the data; the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the generating a first result according to the attribute of the data includes: the size of data belonging to a first data segment is added to generate a first result, wherein the first data segment is one of the data segments.
Further, if the first result satisfies the first condition, triggering a monitoring early warning, including: and if the first result is larger than a third threshold value, triggering a monitoring early warning.
Further, the method further comprises: searching a first offset address of the data in the first type subfile according to the offset address of the first data segment; and positioning the position of the data in the first data segment in the source file of the first type subfile according to the first offset address.
According to another aspect of the present disclosure, the following technical solutions are also provided:
a document monitoring device comprising:
the first reading module is used for reading a first list to obtain a first identifier, wherein the first list comprises the first identifier of a first type of subfile included in the file;
the identifier acquisition module is used for reading the second list and acquiring a second identifier of the first type of subfile in the second list according to the first identifier;
the attribute acquisition module is used for acquiring the attribute of the data indexed by the second identifier;
the first result generation module is used for generating a first result according to the attribute of the data;
and the early warning triggering module is used for triggering the monitoring early warning if the first result meets a first condition.
Further, the file comprises at least one module file, and the module file comprises at least one first type subfile; and storing the corresponding relation between the module file and the first type of subfile in the first list.
Further, the identifier obtaining module further includes:
and the identifier acquisition sub-module is used for reading the second list and searching the second identifier of the first type of subfile in the second list according to the first identifier, wherein the second list comprises the corresponding relation between the first identifier and the second identifier.
Further, the attribute obtaining module further includes:
the first searching module is used for searching the data corresponding to the second identifier in the second list;
the first size obtaining module is used for obtaining the size of the data according to the size attribute value of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generation module further includes:
a first adding module, configured to add sizes of the data in the first type subfile to obtain the first result.
Further, the early warning triggering module further includes:
and the first triggering module is used for triggering the monitoring early warning if the first result is greater than a first threshold value.
Further, the attribute obtaining module further includes:
the second searching module is used for searching the data corresponding to the second identifier in the second list;
the data type acquisition module is used for acquiring the data type of the data according to the offset address of the data, wherein the data type at least comprises a first data type and a second data type;
the second size obtaining module is used for obtaining the size of the data of the first data type in the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generation module further includes:
and the second adding module is used for adding the sizes of all the data of the first data type to obtain a first result.
Further, the early warning triggering module further includes:
and the second triggering module is used for triggering the monitoring early warning if the first result is greater than a second threshold value.
Further, the attribute obtaining module further includes:
the third searching module is used for searching the data corresponding to the second identifier in the second list;
the name acquisition module is used for acquiring the name of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generation module further includes:
and the comparison module is used for comparing the names of the data in the at least two first type subfiles and outputting repeated names in the names.
Further, the early warning triggering module further includes:
and the third triggering module is used for triggering monitoring early warning if the number of the repeated names is more than 0.
Further, the attribute obtaining module further includes:
the third searching module is used for searching the data corresponding to the second identifier in the second list;
the third size obtaining module is used for obtaining the size of the data according to the size attribute value of the data;
a data segment obtaining module, configured to obtain a data segment in which the data is located according to the offset address of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generation module further includes:
and the third adding module is used for adding the sizes of the data belonging to the first data segment to generate a first result, wherein the first data segment is one of the data segments.
Further, the early warning triggering module further includes:
and the fourth triggering module is used for triggering the monitoring early warning if the first result is greater than a third threshold value.
Further, the apparatus may further include:
the first offset address searching module is used for searching a first offset address of the data in the first type subfile according to the offset address of the first data segment;
and the positioning module is used for positioning the position of the data in the first data segment in the source file of the first type of subfile according to the first offset address.
According to still another aspect of the present disclosure, there is also provided the following technical solution:
an electronic device, comprising: a memory for storing non-transitory computer readable instructions; and a processor for executing the computer readable instructions, so that the processor implements the steps of any of the above-mentioned document monitoring methods when executing the computer readable instructions.
According to still another aspect of the present disclosure, there is also provided the following technical solution:
a computer readable storage medium storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform the steps of any of the above document monitoring methods.
The disclosure discloses a file monitoring method and device and electronic equipment. The file monitoring method comprises the following steps: reading a first list to obtain a first identifier, wherein the first list comprises the first identifier of a first type of subfile included in the file; reading the second list, and acquiring a second identifier of the first type subfile in the second list according to the first identifier; acquiring the attribute of the data indexed by the second identifier; generating a first result according to the attribute of the data; and if the first result meets the first condition, triggering monitoring early warning. According to the file monitoring method, the judgment basis is generated according to the subfiles in the file and the attributes of the data in the subfiles. According to the judgment basis, whether the volume of the file or the local volume of the file exceeds the standard or not is judged, and an early warning prompt is triggered, so that the technical problem that the position where the volume of the file exceeds the standard cannot be located in the prior art is solved.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Detailed Description
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a file monitoring method. The file monitoring method provided by the embodiment may be executed by a computing device, where the computing device may be implemented as software, or implemented as a combination of software and hardware, and the computing device may be integrated in a server, a terminal device, or the like. As shown in fig. 1, the file monitoring method mainly includes the following steps S101 to S105. Wherein:
step S101: reading a first list to obtain a first identifier, wherein the first list comprises a first identifier of a first type of subfile included in the file;
in the present disclosure, at least one module file is included in the file, and at least one first-type subfile is included in the module file. The file may be an executable file comprising a plurality of function module files, each of which may in turn comprise at least one object file. Typically, the executable file is a special effect program, the special effect program includes a plurality of special effect modules, such as a beauty module, a filter module, a deformation module, and the like, and each functional module includes one or more target files for implementing the function.
The first list is used for storing the identifier of the module file included in the file and the identifier of the first type of subfile included in the module file. Typically, the first list includes names of the module files, and names of the target files included in each module file. As shown in table 1 below, an example of the first list:
TABLE 1
The first list comprises an identifier module 1, a module 2 and a module 3 of a module file included in the file, the ID of an object file is 1-1, 1-2, 2-1, 2-2, 2-3, 2-4 and 3-1, the name of the object file is object file 1, object file 2, object file 3, object file 4, object file 5, object file 6 and object file 7. In this step, the first identifier of the first subfile is the name of the target file. In this step, the first list is read, and the name of the target file is obtained.
Step S102: reading the second list, and acquiring a second identifier of the first type subfile in the second list according to the first identifier;
in the present disclosure, the second list is a list including a plurality of sub-tables, where in a first sub-table of the second list, a corresponding relationship between a first identifier and a second identifier of the first type of sub-file is included. Wherein the first identifier is a name of a target file, and the second identifier is a number of the target file in a second list. As shown in table 2, which is an example of the first sub-table of the second list:
object document numbering
|
Name of target file
|
1
|
Object document 1
|
2
|
Object document 2
|
3
|
Object document 3 |
TABLE 2
As shown in Table 2, the numbers 1, 2, and 3 of the target file are the second identifier of the target file.
In step S102, obtaining the second identifier of the first type subfile in the second list according to the first identifier includes looking up the second identifier of the first type subfile in the second list according to the first identifier. As shown in table 2, the number of the target file in the second list can be looked up by its name.
Step S103: acquiring the attribute of the data indexed by the second identifier;
in this step, the data is data contained in the first type subfile. Typically, the first type subfile is a target file, and the data is data contained in the target file, and the data may be a class, a method, a constant, a character string, and the like in an executable program, which are not listed herein.
The second list further includes a second sub-list. The second sub-list includes the corresponding relationship between the second identifier and the attribute of the data, where the attribute may be, for example, the name of the data, the storage offset address of the data, the size of the data, and the like. An example of the second sublist is shown in table 3:
offset address
|
Size and breadth
|
Belonging to object file
|
Name of data
|
0x00000001
|
0x0000004E
|
1
|
Data 1
|
0x0000004F
|
0x00000300
|
1
|
Data 2
|
0x0000034F
|
0x00000617
|
1
|
Data 3
|
0x00000966
|
0x00000400
|
2
|
Data 4 |
TABLE 3
As shown in table 3, the first column "offset address" in the second sub-list includes the storage offset address of the data, which represents the offset address of the data in the file, and in the example, the offset address is a hexadecimal number; the second column "size" of the second sublist represents the size of the data, which in this example is a hexadecimal number; the third column of the second sub-list, "belonging target file", indicates to which target file the data belongs, the value of "belonging target file" being, in this example, the second identifier of the first sub-file in the first list; the fourth column of the second sublist has the value "name of data" as the name of the data in the file. In this example, the attribute of the data indexed by the second identifier may be obtained by the value of "belonging target file" in the third column, for example, by the value 1 of "belonging target file", it may be indexed to include data 1, data 2, and data 3, where the start address of data 1 is 0x00000001, the size is 0x0000004E, the start address of data 2 is 0x0000004F, the size is 0x00000300, and the start address of data 3 is 0x0000034F, the size is 0x 00000617.
As shown in fig. 2, the step S103 may include:
step S201: searching the data corresponding to the second identifier in the second list;
step S202: acquiring the size of the data according to the size attribute value of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Referring to table 3, the size of the data with value 1 of the belonging target file is searched in the second sub-list of the second list, and through the row with value 1 of the column of the "belonging target file", it can be found that the corresponding data is data 1, size 0x0000004E, data 2, size 0x00000300, data 3, size 0x 00000617.
Step S104: generating a first result according to the attribute of the data;
after the attributes of the data are acquired, the attributes of the data are processed to obtain a first result, and the first result is used for judging whether the volume of the file is abnormal or not in the following steps.
As shown in fig. 3, in an embodiment, the generating a first result according to the attribute of the data includes:
step S301: adding the sizes of the data in the first type of subfile to obtain the first result. The step is executed after step S202, and the size of each data corresponding to the second identifier is obtained in step S202, and the size of each data is added to obtain the first result in this step. Specifically, as shown in table 3, when data 1, size 0x0000004E, data 2, size 0x00000300, and data 3, size 0x00000617 are obtained, the first result is obtained as: 0x0000004E +0x00000300+0x00000617 ═ 0x00000965 ═ 2.35 Kb.
Step S105: and if the first result meets the first condition, triggering monitoring early warning.
And in the step, whether monitoring early warning is triggered or not is determined according to whether the first result meets certain conditions or not. Typically, a monitoring precaution is triggered if the first result satisfies a first condition.
In one embodiment, the triggering a monitoring precaution if the first result satisfies the first condition includes: and if the first result is larger than a first threshold value, triggering monitoring early warning.
As in the example of step S301, it is obtained that the sum of the sizes of all data in the target file 1 is 2.35Kb, if the first threshold is 2Kb, the monitoring and early warning is triggered, and the name of the target file 1 can be directly displayed by the display device, so as to prompt that the volume of the file of the user is abnormal, and the abnormal file is the target file 1. It can be understood that the sizes of all the target files in the module file can be calculated through the names of the target files, so that the sizes of the module files can be calculated, and early warning can be performed according to the sizes of the module files. Therefore, the volumes of the files can be pre-warned in different granularities.
In some cases, it may be that the entire volume of the file is not exceeded, and the sizes of the module files in the file and the first type subfiles of the module files are not exceeded, but they do not satisfy some other conditions, such as special requirements for certain types of data, where the volume of the file needs to be monitored in other dimensions. Optionally, as shown in fig. 4, the step S103 may further include:
step S401: searching the data corresponding to the second identifier in the second list;
step S402: acquiring the data type of the data according to the offset address of the data, wherein the data type at least comprises a first data type and a second data type;
step S403: acquiring the size of data of a first data type in the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
In step S401, all data corresponding to the second identifier of the first type subfile may be queried according to the second sublist of the second list shown in table 3; wherein the second identifier of the first type of subfile is the value of the "belonged to target file" column in table 3.
In step S402, the data type of the data is obtained according to the offset address of the data, where the data type at least includes a first data type and a second data type. In this step, an offset address of data to be acquired is preferred, the offset address may be acquired according to an "offset address" column in the second sub-list, and then, the address where the offset address is located may be queried through a third sub-list of the second list as to which data type address. As shown in table 4, an example of a third word list:
TABLE 4
In step S402, by obtaining the offset addresses of the data in the second sub-list, such as offset address 0x00000001 of data 1, offset address 0x0000004F of data 2, and offset address 0x0000034F of data 3, and then searching the offset addresses of data 1, data 2, and data 3 in the third sub-list of the second list, where offset address 0x00000001 of data 1 falls between addresses 0x00000001 and 0x0000034F, it may be determined that data 1 is the first type of data, offset address 0x0000004F of data 2 also falls between addresses 0x00000001 and 0x0000034F, it may be determined that data 2 is also the first type of data, offset address 0x0000034F of data 3, falls between addresses 0x0000034F and 0x00000B4F (size 0x0000034F + size 0x00000800 of data segment), it may be determined that data 3 is also the first type of data. From this all data of the first type in the target file 1 can be determined.
In step S403, the size of all the first type of data may be acquired through the second sub-list of the second list. Having determined that data 1, data 2, and data 3 are all the first type of data in step S402, the sizes of data 1, data 2, and data 3 are looked up in table 3.
After step S403, step S104 is performed, in this embodiment, the step S104 includes: and adding the sizes of all the data of the first data type to obtain a first result.
In the step, the sizes of data 1, data 2, and data 3 are added to obtain a first result.
Step S105 is then performed, in this embodiment, step S105 includes:
and if the first result is larger than a second threshold value, triggering monitoring early warning.
In this embodiment, when the volume of the first type data in the first type subfile exceeds a threshold, an early warning is triggered and the first type data volume is displayed to be out of compliance, which requires optimization. It is to be understood that the first type subfiles are used as an example, and in fact, if the sizes of the first type data of all the first type subfiles in the module file are added, the size of the first type data in the module file can be obtained, and the size of the first type data in all the modules can be obtained, so that the triggering condition of the volume pre-warning can be controlled by different granularities, and the user can set the granularity needing pre-warning as required to control the fineness of the volume monitoring.
For some cases, the same data may be included in different subfiles of the first type, at which point the file may be optimized to reduce the file volume. As shown in fig. 5, in an embodiment, the step S103 of obtaining the attribute of the data of the second identifier index may further include:
step S501: searching the data corresponding to the second identifier in the second list;
step S502: acquiring the name of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
In step S501, all data corresponding to the second identifier of the first type subfile may be queried according to the second sublist of the second list shown in table 3; wherein the second identifier of the first type of subfile is the value of the "belonged to target file" column in table 3.
In step S502, the names of the data of all the data corresponding to the second identifier may be queried from the second sub-list of the second list. As shown in table 3, the data corresponding to the target file 1 includes data 1, data 2, and data 3.
After step S502, step S104 is executed, in this embodiment, step S104 includes:
comparing names of data in at least two of the first type subfiles and outputting duplicate ones of the names.
In the step, the names of the data belonging to the two target files are compared, and the name of the duplicated data is output. If data 1, data 2 and data 3 are included in the object file 1, data 3 is output if data 3 is also included in the object file 2.
After the step S104, step S105 is executed, in this embodiment, the step S105 includes:
and if the number of the repeated names is more than 0, triggering monitoring early warning.
In step S105 of the embodiment, it is determined whether the number of the repeated names is greater than 0, and if so, a monitoring and early warning is triggered. That is, as long as there is a duplicate data name, a monitoring and early warning is triggered, and the duplicate data name is output. Through the steps in this embodiment, duplicate data in two target files may be output, thereby alerting the user to optimize the duplicate data.
In other cases, it is necessary to pre-warn the size of the file volume from the dimension of the data segment of the data, and in this case, as shown in fig. 6, the step S103 may include the following steps:
step S601: searching the data corresponding to the second identifier in the second list;
step S602: acquiring the size of the data according to the size attribute value of the data;
step S603: acquiring a data segment where the data is located according to the offset address of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
In step S601, all data corresponding to the second identifier of the first type subfile may be queried according to a second sublist of the second list shown in table 3; wherein the second identifier of the first type of subfile is the value of the "belonged to target file" column in table 3.
In step S602, as in the other embodiments, the size of all data corresponding to the second identifier acquired in step S601 may be acquired in the "size" column in table 3.
In step S603, a data segment in which the data is located may be obtained by an offset address of the data, as shown in table 3 and table 4, taking data 1 as an example, and the offset address of data 1 is 0x00000001, and the offset address may be used to query table 4 that the address falls between addresses 0x00000001 and 0x0000034F, so that it may be determined that data 1 is located in data segment 1.
After step S603, step S104 is executed, and in the embodiment, the step S104 may include:
the size of data belonging to a first data segment is added to generate a first result, wherein the first data segment is one of the data segments.
The size of the data has already been acquired in step S602, and the size of the data segment is obtained by adding the sizes of the data belonging to the same data segment in step S104. As in the above example, the sizes of all data located in the data segment 1 are added to obtain the size of the data segment 1 of the target file 1.
After the step S104, the step S105 is executed, and in this embodiment, the step S105 may include:
and if the first result is larger than a third threshold value, triggering a monitoring early warning.
In this step, if the size of the data segment is greater than a third threshold, a monitoring pre-warning is triggered. In this embodiment, the size of the data segment in the module file may be counted, and compared with a predetermined data segment size, and when a certain data segment is greater than its threshold, an early warning is triggered and a data segment whose volume exceeds the standard is output. It can be understood that each data segment may have different thresholds, for example, a string segment and a constant segment may have different thresholds, so that the output result may not be a unique data segment, and any data segment exceeding its own threshold may trigger an early warning.
In this embodiment, the location of the data in the source file of the file may be further determined, so as to further locate the source file location corresponding to the data segment with the overproof volume, and directly locate the location of the problem. As shown in fig. 7, in this embodiment, after step S105, the method further includes:
step S701: searching a first offset address of the data in the first type subfile according to the offset address of the first data segment;
step S702: and positioning the position of the data in the first data segment in the source file of the first type subfile according to the first offset address.
The first data segment offset address in step S701 may be a first offset address of data in the first data segment in the first type subfile, or the first offset address of the data in the first type subfile may be obtained through a pairwise relationship between the first data segment offset address and the first offset address of the data in the first type subfile by using the offset address of the first data segment, where the correspondence relationship may be a correspondence table or the like.
In step S702, the position of the data in the first data segment in the source file of the first type subfile is located according to the first offset address. Typically, the target file is generated from a source file of the target file, and the offset address of the data segment in the target file can be located to the position of the data segment in the source file, so that the optimization of the target file by the optimization of the source file is performed.
The disclosure discloses a file monitoring method and device and electronic equipment. The file monitoring method comprises the following steps: reading a first list to obtain a first identifier, wherein the first list comprises the first identifier of a first type of subfile included in the file; reading the second list, and acquiring a second identifier of the first type subfile in the second list according to the first identifier; acquiring the attribute of the data indexed by the second identifier; generating a first result according to the attribute of the data; and if the first result meets the first condition, triggering monitoring early warning. According to the file monitoring method, the judgment basis is generated according to the subfiles in the file and the attributes of the data in the subfiles. According to the judgment basis, whether the volume of the file or the local volume of the file exceeds the standard or not is judged, and an early warning prompt is triggered, so that the technical problem that the position where the volume of the file exceeds the standard cannot be located in the prior art is solved.
In the above, although the steps in the above method embodiments are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily performed in the above sequence, and may also be performed in other sequences such as reverse, parallel, and cross, and further, on the basis of the above steps, other steps may also be added by those skilled in the art, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
For convenience of description, only the relevant parts of the embodiments of the present disclosure are shown, and details of the specific techniques are not disclosed, please refer to the embodiments of the method of the present disclosure.
The embodiment of the disclosure provides an image processing device. The apparatus may perform the steps described in the above-described document monitoring method embodiments. As shown in fig. 8, the apparatus 800 mainly includes: a first reading module 801, an identifier obtaining module 802, an attribute obtaining module 803, a first result generating module 804 and an early warning triggering module 805. Wherein,
a first reading module 801, configured to read a first list to obtain a first identifier, where the first list includes a first identifier of a first type of subfile included in the file;
an identifier obtaining module 802, configured to read the second list, and obtain, according to the first identifier, a second identifier of the first type subfile in the second list;
an attribute obtaining module 803, configured to obtain an attribute of the data indexed by the second identifier;
a first result generation module 804, configured to generate a first result according to the attribute of the data;
and an early warning triggering module 805 configured to trigger the monitoring early warning if the first result satisfies a first condition.
Further, the file comprises at least one module file, and the module file comprises at least one first type subfile; and storing the corresponding relation between the module file and the first type of subfile in the first list.
Further, the identifier obtaining module 802 further includes:
and the identifier acquisition sub-module is used for reading the second list and searching the second identifier of the first type of subfile in the second list according to the first identifier, wherein the second list comprises the corresponding relation between the first identifier and the second identifier.
Further, the attribute obtaining module 803 further includes:
the first searching module is used for searching the data corresponding to the second identifier in the second list;
the first size obtaining module is used for obtaining the size of the data according to the size attribute value of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generating module 804 further includes:
a first adding module, configured to add sizes of the data in the first type subfile to obtain the first result.
Further, the early warning triggering module 805 further includes:
and the first triggering module is used for triggering the monitoring early warning if the first result is greater than a first threshold value.
Further, the attribute obtaining module 803 further includes:
the second searching module is used for searching the data corresponding to the second identifier in the second list;
the data type acquisition module is used for acquiring the data type of the data according to the offset address of the data, wherein the data type at least comprises a first data type and a second data type;
the second size obtaining module is used for obtaining the size of the data of the first data type in the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generating module 804 further includes:
and the second adding module is used for adding the sizes of all the data of the first data type to obtain a first result.
Further, the early warning triggering module 805 further includes:
and the second triggering module is used for triggering the monitoring early warning if the first result is greater than a second threshold value.
Further, the attribute obtaining module 803 further includes:
the third searching module is used for searching the data corresponding to the second identifier in the second list;
the name acquisition module is used for acquiring the name of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generating module 804 further includes:
and the comparison module is used for comparing the names of the data in the at least two first type subfiles and outputting repeated names in the names.
Further, the early warning triggering module 805 further includes:
and the third triggering module is used for triggering monitoring early warning if the number of the repeated names is more than 0.
Further, the attribute obtaining module 803 further includes:
the third searching module is used for searching the data corresponding to the second identifier in the second list;
the third size obtaining module is used for obtaining the size of the data according to the size attribute value of the data;
a data segment obtaining module, configured to obtain a data segment in which the data is located according to the offset address of the data;
the data is data in a first type of subfile, and the second list comprises the corresponding relation between the second identifier and the data.
Further, the first result generating module 804 further includes:
and the third adding module is used for adding the sizes of the data belonging to the first data segment to generate a first result, wherein the first data segment is one of the data segments.
Further, the early warning triggering module 805 further includes:
and the fourth triggering module is used for triggering the monitoring early warning if the first result is greater than a third threshold value.
Further, the apparatus 800 may further include:
the first offset address searching module is used for searching a first offset address of the data in the first type subfile according to the offset address of the first data segment;
and the positioning module is used for positioning the position of the data in the first data segment in the source file of the first type of subfile according to the first offset address.
The apparatus shown in fig. 8 can perform the method of the embodiments shown in fig. 1, fig. 2, fig. 3, fig. 4, fig. 5 and fig. 6, and the parts not described in detail in this embodiment can refer to the related descriptions of the embodiments shown in fig. 1, fig. 2, fig. 3, fig. 4, fig. 5 and fig. 6. The implementation process and technical effect of the technical solution are described in the embodiments shown in fig. 1, fig. 2, fig. 3, fig. 4, fig. 5, and fig. 6, and are not described again here.
Referring now to FIG. 9, shown is a schematic diagram of an electronic device 900 suitable for use in implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 901 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are also stored. The processing apparatus 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
Generally, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic apparatus 900 to perform wireless or wired communication with other apparatuses to exchange data. While fig. 9 illustrates an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing apparatus 901.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an original image from an image source and displaying the original image on a display device; collecting voice in an environment and identifying the semantic meaning of the voice; triggering special effect processing in response to recognizing predetermined semantics from the speech, wherein the predetermined semantics are preset semantics associated with one or more special effect processing; and processing the original image according to the triggered special effect processing to form and display an image special effect.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of an element does not in some cases constitute a limitation on the element itself.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.