Picture auditing method and device, electronic equipment and storage medium
By building and updating the target data structure to store and manage the audit status of multiple images, the problem of time-consuming manual query audit status is solved and the efficiency of auditing of multiple images is improved.
Patent Information
- Application Number
- CN202510163287.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-06
AI Technical Summary
During the review process of multiple pictures, it takes a lot of time to manually check the review situation regularly, resulting in low audit efficiency.
By obtaining the target image set to be reviewed, a target data structure is built to store the audit status of each image, and the data structure is updated based on the audit results, so as to quickly obtain the latest audit status.
The review of the accumulated pictures through the target data structure has significantly improved the efficiency of determining the review situation during multi-image review.
Smart Images

Figure CN120104827A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of picture review, and in particular to a picture review method, device, electronic device and storage medium. Background Art
[0002] With the development of the Internet, multimedia content such as pictures and videos are becoming more and more common in social media, e-commerce and content sharing platforms. However, this trend has led to more and more serious challenges in the content review of multimedia content, especially the review of multiple pictures.
[0003] At present, for image review, the upstream business party (i.e. the party submitting the image for review) generally submits the image for review, and then the reviewer manually maintains the review status of the relevant images. When faced with the review of multiple images, it takes a lot of time to manually and regularly query the review status of multiple images, which leads to low efficiency in determining the review status when reviewing multiple images. Summary of the invention
[0004] The embodiments of the present application provide a picture review method, device, electronic device and storage medium, which can improve the efficiency of determining the review status when reviewing multiple pictures.
[0005] In a first aspect, an embodiment of the present application provides a method for image review, the method comprising:
[0006] Obtain a target picture set to be reviewed, wherein the target picture set includes at least two pictures;
[0007] Based on the pictures in the target picture set, construct a target data structure corresponding to the target picture set, wherein the target data structure includes a plurality of data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set;
[0008] Obtaining a review result for at least one target image in the target image set;
[0009] Based on the review results of the above-mentioned target images, the data at the corresponding data storage location in the above-mentioned target data structure is updated so that the updated target data structure indicates the latest image review status in the above-mentioned target image set.
[0010] In a second aspect, an embodiment of the present application provides a picture review device, the device comprising:
[0011] An image acquisition module is used to acquire a target image set to be reviewed, wherein the target image set includes at least two images;
[0012] A construction module, configured to construct a target data structure corresponding to the target picture set based on the pictures in the target picture set, wherein the target data structure includes a plurality of data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set;
[0013] A result acquisition module, used to obtain the review result of at least one target image in the target image set;
[0014] The data updating module is used to update the data at the corresponding data storage location in the above-mentioned target data structure based on the review results of the above-mentioned target images, so that the updated target data structure indicates the latest image review status in the above-mentioned target image set.
[0015] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute the steps of any one of the image review methods provided in the embodiments of the present application.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps of any one of the image review methods provided in the embodiments of the present application.
[0017] In a fifth aspect, an embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of any one of the image review methods provided in the embodiments of the present application.
[0018] By adopting the scheme of the embodiment of the present application, a target picture set including at least two pictures to be reviewed can be obtained, and a target data structure corresponding to the target picture set can be constructed based on the pictures in the target picture set, wherein the target data structure includes multiple data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set. Then, the review result for at least one target picture in the target picture set is obtained, and the data at the corresponding data storage location in the target data structure is updated based on the review result of the target picture, so that the updated target data structure indicates the latest picture review status in the target picture set, thereby accumulating the review status of the pictures in the target picture set through the target data structure, and improving the efficiency of determining the review status during multi-picture reviews. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 This is a schematic diagram of an embodiment of the process of image review method provided in the embodiments of the present application;
[0021] Figure 2 It is a schematic diagram of the picture submission process provided in the embodiment of the present application;
[0022] Figure 3 is a schematic diagram of the target data structure provided in the embodiments of the present application;
[0023] Figure 4 It is a schematic diagram of a storage scenario of the audit results provided in an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of an updated target data structure provided in an embodiment of the present application;
[0025] Figure 6 is another schematic diagram of an updated target data structure provided in an embodiment of the present application;
[0026] Figure 7 is a schematic diagram of another updated target data structure provided in an embodiment of the present application;
[0027] Figure 8 is another updated target data structure schematic diagram provided in an embodiment of the present application;
[0028] Fig. 9 It is a schematic diagram of another embodiment of the process flow of the image review method provided in the embodiments of the present application;
[0029] Fig.10 It is a structural schematic diagram of the image review device provided in the embodiment of the present application;
[0030] Fig.11 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0032] Embodiments of the present application provide a picture review method, device, electronic device, and computer-readable storage medium.
[0033] Specifically, this embodiment will be described from the perspective of a picture review device, which can be integrated into an electronic device, that is, the picture review method of the embodiment of the present application can be executed by an electronic device, and optionally, the electronic device can include: a terminal device. The terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC) and other devices.
[0034] The image review method provided in the embodiment of the present application can be applied to, for example, an image review system. The image review system may include a player terminal device and a server, and the terminal may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. The player terminal device and the server may perform two-way communication via a network.
[0035] Optionally, the server may be an independent server, or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0036] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.
[0037] The image review method of this embodiment obtains a target image set to be reviewed, wherein the target image set includes at least two images; based on the images in the target image set, a target data structure corresponding to the target image set is constructed, wherein the target data structure includes multiple data storage locations, and the data at each of the data storage locations is used to indicate the image review status of an image in the target image set; obtains the review result for at least one target image in the target image set; based on the review result of the target image, updates the data at the corresponding data storage location in the target data structure, so that the updated target data structure indicates the latest image review status in the target image set, which can improve the efficiency of determining the review status during multi-image review.
[0038] Please refer to Figure 1 Taking a terminal as an example, this embodiment provides a method for image review. The specific process of the method for image review may be as follows: Steps 101 to 104, wherein:
[0039] Step 101: Obtain a target picture set to be reviewed, wherein the target picture set includes at least two pictures.
[0040] Among them, the pictures included in the above-mentioned target picture set are pictures to be reviewed by the review platform. There are correlations between the pictures in the target picture set, such as being triggered for review by the same user, or belonging to the same game project, etc. The specific settings can be made according to needs and are not limited here.
[0041] In this embodiment, the pictures in the above-mentioned target picture set may be sent to the review platform for review at the same time, or may be sent to the review platform for review at different times.
[0042] In some embodiments, since there are multiple pictures in the target picture set, in order to indicate that the multiple pictures are pictures in the same target picture set, the above-mentioned target picture set can be configured with a collection identifier for indicating the above-mentioned target picture set. The collection identifier is a unique identifier that will not change. The collection identifier is used to associate pictures. Each picture is bound to a collection identifier to indicate that pictures with the same collection identifier are pictures in the same target picture set, indicating that pictures with the same collection identifier are associated with each other.
[0043] Correspondingly, the above method also includes: the terminal can receive at least one picture to be reviewed carrying a collection identifier, so as to compare the collection identifier of the picture to be reviewed with the collection identifier of the target picture set already existing on the review platform. If the collection identifier of the above picture to be reviewed is the same as the collection identifier of the above target picture set, it means that the picture to be reviewed is related to the pictures in the target picture set, and they are the same batch of pictures that need to be reviewed. Therefore, the above picture to be reviewed needs to be added to the above target picture set to update the number of pictures in the above target picture set.
[0044] Among them, the method of adding the above-mentioned pictures to be reviewed to the above-mentioned target picture set may include: updating the picture information associated with the pictures to be reviewed, such as the total number of dynamic pictures in the target picture set in the picture information, and the total number of dynamic pictures is used to indicate the number of pictures in the target picture set. When new pictures to be reviewed are added to the target picture set, only the picture information of the latest added pictures to be reviewed can be updated, or the picture information of all pictures to be reviewed in the target picture set can be updated. For example, the total number of dynamic pictures in the target picture set in the picture information is updated to the number after the latest pictures to be reviewed are added. The specific setting can be based on demand and is not limited here.
[0045] Optionally, in order to facilitate the review of the pictures in the target picture set, the picture information associated with the picture also includes but is not limited to the picture address, collection identifier, picture serial number, etc., which can be set according to needs and is not limited here.
[0046] Among them, different pictures in the target picture set have different picture numbers. The picture number can be a customized number set by the user when sending the dynamic, or it can be determined by the time when the picture is added to the target picture set, etc. It can be set according to needs and is not limited here.
[0047] For example, Figure 2 As shown in FIG. 1 , the user can send the review content including multiple pictures such as picture 1, picture 2 and picture 3 to the review platform for review to complete the review task of multiple pictures. The process of sending multiple pictures is disorderly and completely asynchronous. Figure 2 The picture information of the picture includes the picture address, the dynamic id (that is, the above-mentioned collection identifier), the picture sequence number and the total number of dynamic pictures.
[0048] Step 102: Based on the pictures in the target picture set, construct a target data structure corresponding to the target picture set, wherein the target data structure includes multiple data storage locations, and the data at each data storage location is used to indicate the picture review status of a picture in the target picture set.
[0049] Among them, the target data structure corresponding to the above-mentioned target picture set is used to store data indicating the review status of the pictures in the target picture set. Since there are multiple pictures in the target picture set, the number of data storage locations in the target data structure needs to be equal to or greater than the number of pictures in the target picture set, so that the target data structure can store data indicating the picture review status of the corresponding pictures respectively.
[0050] In this embodiment, the above-mentioned target data structure can be constructed after obtaining the pictures in the target picture set. The above-mentioned target data structure can also obtain the review result of a certain picture in the target picture set in a callback manner, and also obtain the picture information associated with the picture, so as to construct the target data structure corresponding to the target picture set to which the picture belongs based on the picture information associated with the picture, such as the number of pictures in the target picture set, and at the same time, based on the obtained review result, update the data at the corresponding data storage location in the target data structure to indicate the latest review status of the picture, etc. The specific setting can be made according to the needs and is not limited here.
[0051] Specifically, the terminal can initialize a target data structure in a preset database (such as a Redis database) for the target picture set. The target data structure can have at least one to indicate the review status of each picture in the target picture set, so as to facilitate relevant personnel to clarify the review status of the pictures in the target picture set, such as the review status of multiple pictures in the target picture set, and the review progress of multiple pictures in the target picture set.
[0052] Optionally, in order to clarify the review status of the pictures in the target picture set from a multi-dimensional perspective, there may be at least two target data structures mentioned above to store data that can indicate the review status of the pictures from different dimensions.
[0053] For example, Figure 3 As shown, in the Redis database, two bitmap structures can be initialized as target data structures, such as FINISH_KEY and RESULT_KEY, so as to store data indicating the review progress through FINISH_KEY and data indicating the review result through RESULT_KEY, respectively. This makes it easy to quickly determine whether all images of the same dynamic have completed the review based on the data indicating the review progress in FINISH_KEY, and to quickly determine whether all images of the same dynamic have passed the review based on the data indicating the review result in RESULT_KEY.
[0054] Among them, from Figure 3 It can be seen that there are 4 pictures in the target picture set. In the initially constructed target data structures FINISH_KEY and RESULT_KEY, a data storage location is set for each picture. Since there are currently no audit results of pictures participating in the update of the target data structure, the data at each data storage location in the target data structure is 0. When the audit results of pictures participate in the update of the target data structure, the data at the corresponding data storage location can be updated to 1 to distinguish it from the data 0 at other data storage locations.
[0055] It is understandable that if the review results of the images are stored directly in the database, a lot of bytes will undoubtedly be occupied, and each time the terminal queries the review status of the images in the target image set, it needs to traverse the stored data. By adopting the target data structure, only one or fewer bytes are used to indicate the review status of the image, which will undoubtedly greatly reduce the storage space to solve the problem of excessive memory usage when reviewing multiple images.
[0056] In some embodiments, the above-mentioned construction of the target data structure corresponding to the target picture set based on the pictures in the target picture set may include: based on the number of pictures in the target picture set, construction of the target data structure corresponding to the target picture set, that is, the number of data storage locations in the target data structure matches the number of pictures, such as the number of data storage locations is greater than or equal to the number of pictures.
[0057] Among them, the number of pictures in the above-mentioned target picture set can be obtained based on the number of pictures contained in the picture information associated with a picture in the target picture set, or the number of pictures in the target picture set can be clarified based on the traversal of the pictures in the target picture set, etc. The specific setting can be made according to needs and is not limited here.
[0058] In some embodiments, each picture in the target picture set is configured with a picture serial number, and the target data structure corresponding to the target picture set is constructed based on the pictures in the target picture set, including: constructing the target data structure corresponding to the target picture set based on the picture serial numbers of each picture in the target picture set, that is, associating the picture serial number with a data storage location in the target data structure, so as to achieve matching between the data storage location in the target data structure and the picture serial number of a picture in the target picture set.
[0059] Step 103: Obtain the review result for at least one target image in the target image set.
[0060] Among them, the review results of the above-mentioned target images include image review passed and image review failed. The review platform can review the target images to feedback the corresponding review results and associate them with the target images.
[0061] In this embodiment, since the target image set contains multiple images, each image generates corresponding audit results at different audit times. Therefore, after the image is audited through the audit platform to generate corresponding audit results, the audit results of the target image can be stored in a preset database so that the audit results of the target image can be called back when needed. Alternatively, after the audit platform generates the audit results of the target image, the audit results of the target image can be directly obtained so that the audit results of the target image can be processed subsequently.
[0062] Optionally, while obtaining the review result of at least one target image, image information associated with the target image can also be obtained, such as the number of images in the target image set in which the target image is located, the image sequence number of the target image, etc., so as to build a target data structure based on the number of images and / or the image sequence number, or, based on the image sequence number of the target image, update the review result of the target image to the target data structure, etc. The specific settings can be made according to needs and are not limited here, so as to solve the problem that multiple images cannot be associated after being split into a single image for callback.
[0063] In some embodiments, the review results of the above-mentioned target images are stored in a preset database, and the above-mentioned obtaining of the review results for at least one target image in the above-mentioned target image set includes: if a storage status code fed back by the above-mentioned preset database is received, then obtaining the review results of the above-mentioned target image from the above-mentioned preset database, and the above-mentioned storage status code is triggered when the above-mentioned preset database completes storing the review results of the above-mentioned target image.
[0064] It is understandable that after the audit platform generates the audit result of the image, the audit result of the image will be stored in the preset database. In order to be able to respond as quickly as possible when the audit result of the image is called back and avoid occupying the thread to process the audit result of the image, the audit result of the image can be stored in the preset database. For example, the audit result of the image is associated with the image information in the preset database and stored in the database in the form of a list. Then, after the audit result is stored in the preset database, the preset database can be triggered to respond to the audit platform and return a storage status code (such as status code 200) to indicate that the corresponding audit result has been stored in the database. There is no need to occupy the IO thread anymore, and all subsequent audit result processing is performed asynchronously, thereby solving the problem of occupying the audit platform request resources due to possible consumption delays on the business side.
[0065] In addition, if the preset database returns a status code other than the storage status code, it means that there is an abnormality in the current service, and the audit platform can be controlled to re-call data or re-store data according to the corresponding rules.
[0066] In some embodiments, the preset database includes a Redis database, the search identifier of the target image in the Redis database is a key value, and the review result of the target image is a value value.
[0067] Among them, the above-mentioned search identifier can be set manually, or generated based on image information associated with the target image, or generated randomly, etc. It can be set specifically according to needs and is not limited here.
[0068] Specifically, the rpush command can be used in the Redis database to store the review result of the target image in the corresponding location in the Redis database.
[0069] For example, Figure 4 As shown, Figure 4 It is presented in that when storing the review results of each image in the Redis database, NIV_KEY can be used as the key value, and the review results of the above target image and the image information can be composed into a list structure, which can be used as the value. Since there are multiple images, the list structure of multiple images can be composed into a queue, and the queue can be used as the value.
[0070] Correspondingly, the obtaining of the audit result of the target image from the preset database may include: the terminal may call a preset thread, and read the audit result of the target image from the Redis database based on the search identifier of the target image.
[0071] Among them, multiple daemon threads can be set at the bottom of the service, and multiple microservice instances can be used to continuously start the corresponding daemon threads to consume the data in the list structure in the Redis database in a manner similar to the consumer mode. The audit platform can continuously generate requests for callback audit results to store the generated audit results in the Redis database. Then, the multiple daemon threads set in the server can continuously read the list structure in the Redis database, and use the lpop command in a first-in-first-out manner to ensure that the audit results of the first-audited images are processed first. For example, Figure 4 First read the review result of picture 2, then read the review result of picture 1, and finally read the review result of picture 3.
[0072] Step 104: based on the review result of the target image, update the data at the corresponding data storage location in the target data structure, so that the updated target data structure indicates the latest review status of the images in the target image set.
[0073] In this embodiment, after obtaining the review result of the target image, the data in the target data structure can be maintained based on the review result of the target image, that is, the data at the data storage location corresponding to the target image in the target data structure is updated, so that the updated data can indicate the latest review status of the target image, and the image review status of multiple images in the current target image set can be quickly clarified through the updated target data structure.
[0074] In some embodiments, since there are multiple pictures, a corresponding picture serial number can be set for each picture in the target picture set, therefore, the data storage location corresponding to the target picture can be determined based on the picture serial number of the target picture, that is, based on the audit result of the target picture, updating the data at the corresponding data storage location in the target data structure can include: determining the target data storage location that matches the picture serial number of the target picture in the target data structure; and updating the data at the target data storage location based on the audit result of the target picture.
[0075] In some embodiments, the target data structure includes a progress data structure, such as Figure 3 FINISH_KEY in the target image, the above-mentioned updating of the data at the corresponding data storage location in the target data structure based on the audit result of the target image may include: based on the audit result of the target image, updating the data at the corresponding data storage location in the target data structure to the first target data, the first target data is used to indicate that the audit of the target image is completed, such as Figure 3 In the example, the first target data can be set to 1. If the target image review is completed, the 0 at the data storage location corresponding to the target image in FINISH_KEY is updated to 1.
[0076] For example, based on Figure 3 In the example shown, if the second picture in the target picture set is successfully reviewed, the data in the corresponding data storage location of FINISH_KEY can be set to 1 to obtain the following Figure 5 The updated target data structure diagram is shown.
[0077] Further, based on Figure 5 In the example shown, after the data update is completed in FINISH_KEY, the value at the corresponding data storage location in FINISH_KEY can be obtained through the bitget function. By judging whether the value is 1, it can be determined whether the corresponding image has been reviewed and the callback has been completed, so as to verify the data update result of FINISH_KEY.
[0078] Further, based on Figure 5 In the example shown, if the fourth picture in the target picture set is successfully reviewed, the data in the corresponding data storage location of FINISH_KEY can be set to 1 to obtain the following Figure 6 The updated target data structure diagram is shown.
[0079] Further, based on Figure 6 In the example shown, if the first picture in the target picture set is successfully reviewed, the data in the corresponding data storage location of FINISH_KEY can be set to 1 to obtain the following Figure 7 The updated target data structure diagram is shown.
[0080] Further, based on Figure 7 In the example shown, if the third picture in the target picture set is successfully reviewed, the data in the corresponding data storage location of FINISH_KEY can be set to 1 to obtain the following Figure 8 The updated target data structure diagram is shown.
[0081] In some embodiments, after updating the data at the corresponding data storage location in the above-mentioned target data structure, it also includes: judging the data at each data storage location in the target data structure, and when the data at each data storage location in the above-mentioned target data structure are all the above-mentioned first target data, or the number of the above-mentioned first target data in the above-mentioned target data structure is equal to the number of pictures in the above-mentioned target picture set, it is determined that the review of the pictures in the above-mentioned target picture set is completed.
[0082] Specifically, the bitCount command in the Redis database can be used to determine whether the number of the first target data is consistent with the number of pictures. If so, it means that all pictures in the target picture set have been reviewed. If not, it is necessary to continue to call back the review results of the pictures in the target picture set to maintain the target data structure.
[0083] In some embodiments, the target data structure includes a result data structure, such as Figure 3 The RESULT_KEY in the above-mentioned target image, based on the audit result of the above-mentioned target image, updates the data at the corresponding data storage location in the above-mentioned target data structure, which may include: if the audit result of the above-mentioned target image is that the audit fails, then the data at the corresponding data storage location in the above-mentioned target data structure is updated to the second target data, and the above-mentioned second target data is used to indicate that the above-mentioned target image fails the audit; if the audit result of the above-mentioned target image is that the audit passes, then the data at the corresponding data storage location in the above-mentioned target data structure is updated to the third target data, and the above-mentioned third target data is used to indicate that the above-mentioned target image passes the audit.
[0084] For example, Figure 3 The third target data can be set to 1. If the target image passes the review, the 0 at the data storage location corresponding to the target image in RESULT_KEY is updated to 1. The second target data can also be set to 0. If the target image fails the review, the data storage location corresponding to the target image in RESULT_KEY is maintained at 0 to reduce the adjustment of the data volume in the target data structure.
[0085] For example, based on Figure 3In the example shown, if the second picture in the target picture set is approved, the data in the corresponding data storage location of RESULT_KEY can be set to 1 to obtain the following Figure 5 The updated target data structure diagram is shown.
[0086] Further, based on Figure 5 In the example shown, after the data update is completed in RESULT_KEY, the value at the corresponding data storage location in RESULT_KEY can be obtained through the bitget function to determine whether the value is 1 to determine whether the corresponding image has passed the review.
[0087] Further, based on Figure 5 In the example shown, if the fourth picture in the target picture set fails the review, since the value in RESULT_KEY is 0 when the bitmap is initialized, there is no need to set the value of the data storage location corresponding to the picture that fails the review in RESULT_KEY, so as to obtain the following Figure 6 The schematic diagram of the updated target data structure is shown, thereby saving some data writing consumption, and the overall maximum writing complexity is O(n+1), and the minimum is O(1). Only one operation is initialized, and n is the number of images that have passed the review.
[0088] Further, based on Figure 6 In the example shown, if the first picture in the target picture set is approved, the data in the corresponding data storage location of RESULT_KEY can be set to 1 to obtain the following Figure 7 The updated target data structure diagram is shown.
[0089] Further, based on Figure 7 In the example shown, if the third picture in the target picture set is approved, the data in the corresponding data storage location of RESULT_KEY can be set to 1 to obtain the following Figure 8 The updated target data structure diagram is shown.
[0090] In some embodiments, after updating the data at the corresponding data storage location in the above-mentioned target data structure, it also includes: when the above-mentioned second target data exists in the above-mentioned target data structure, or the number of the above-mentioned third target data in the above-mentioned target data structure is not equal to the number of pictures in the above-mentioned target picture set, based on the data storage location where the above-mentioned second target data is located, determining the target picture that failed the review.
[0091] In this embodiment, after determining that the review of the pictures in the above-mentioned target picture set is completed, it can be determined whether there is a second target data in the target data structure, or it can be determined whether the number of third target data in the target data structure is equal to the number of pictures in the target picture set, so as to determine and locate the target pictures that failed the review.
[0092] Specifically, the bitCount command in the Redis database can be used to determine whether the number of the third target data is consistent with the number of pictures. If so, it means that all pictures in the target picture set have passed the review. If not, there are pictures that have failed the review. The bitpos command can be used to find the data storage location corresponding to the pictures that have failed the review, so as to determine the corresponding picture serial number and locate the target pictures that have failed the review.
[0093] It is understandable that since there may be pictures that fail the review in the target picture set, if a hash table is used, the review results of each picture must be traversed to determine whether there are pictures that fail the review. However, if a target data structure is used, it is only necessary to obtain the data at each data storage location, such as the number of bit values 1, to determine the situation. This has huge advantages in time and space, and the time to obtain the review results of all pictures in the target picture set is greatly reduced.
[0094] In some embodiments, Fig. 9 As shown, users or other terminals can publish dynamics to the server so that the server can split multiple dynamically associated pictures and submit them to the review platform for review respectively, so that the review platform can review the pictures, generate review results for the pictures, and call back the review results for the pictures to store them in the Redis database. Since there are multiple pictures, the list structure of multiple pictures can be queued in the Redis database to achieve that each time a new review result is generated, the review result is stuffed into the queue in the Redis database.
[0095] Then, the server can set up multiple background daemon threads, namely Thread1, Thread2, Thread3 and Thread4. The multiple background daemon threads set up in the server can continuously read the data in the queue in the Redis database, and use the lpop command to ensure that the review results of the images that have been reviewed first are processed first in a first-in-first-out manner.
[0096] At the same time, a thread can be used to build a Redis database, and two bitmap structures can be initialized as target data structures, such as FINISH_KEY and RESULT_KEY, so as to store data indicating the audit progress through FINISH_KEY and data indicating the audit result through RESULT_KEY.
[0097] Then, you can judge whether the review is completed according to FINISH_KEY, and obtain the review results of each image from RESULT_KEY after judging that the review is completed, so as to execute the corresponding business logic according to the review results of each image.
[0098] From the above content, it can be seen that by obtaining a target picture set to be reviewed that includes at least two pictures, a target data structure corresponding to the target picture set is constructed based on the pictures in the target picture set, and the target data structure includes multiple data storage locations. The data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set. Then, the review result for at least one target picture in the target picture set is obtained, and based on the review result of the target picture, the data at the corresponding data storage location in the target data structure is updated, so that the updated target data structure indicates the latest picture review status in the target picture set, thereby accumulating the review status of the pictures in the target picture set through the target data structure, and the efficiency of determining the review status during multi-picture review can be improved.
[0099] This embodiment also provides a picture review device, which can be integrated into a terminal device. Fig.10 As shown, the picture review device may include:
[0100] The picture acquisition module 1001 is used to acquire a target picture set to be reviewed, wherein the target picture set includes at least two pictures;
[0101] A construction module 1002 is used to construct a target data structure corresponding to the target picture set based on the pictures in the target picture set, wherein the target data structure includes multiple data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set;
[0102] The result acquisition module 1003 is used to obtain the review result of at least one target image in the target image set;
[0103] The data updating module 1004 is used to update the data at the corresponding data storage location in the above target data structure based on the review result of the above target image, so that the updated target data structure indicates the latest image review status in the above target image set.
[0104] In some embodiments, the building block 1002 is specifically used to:
[0105] Based on the number of pictures in the target picture set, a target data structure corresponding to the target picture set is constructed.
[0106] In some embodiments, the target picture set is configured with a set identifier for indicating the target picture set, and the picture review device further includes a quantity updating module, which is specifically used to:
[0107] Receive at least one image to be reviewed with a collection logo;
[0108] If the set identifier of the above-mentioned picture to be reviewed is the same as the set identifier of the above-mentioned target picture set, the above-mentioned picture to be reviewed is added to the above-mentioned target picture set to update the number of pictures in the above-mentioned target picture set.
[0109] In some embodiments, each picture in the target picture set is configured with a picture sequence number, and the construction module 1002 is specifically used to:
[0110] Based on the picture sequence number of each picture in the target picture set, a target data structure corresponding to the target picture set is constructed, wherein one of the data storage locations in the target data structure matches the picture sequence number of a picture in the target picture set.
[0111] In some embodiments, the data updating module 1004 is specifically used for:
[0112] In the target data structure, determining a target data storage location that matches the picture sequence number of the target picture;
[0113] Based on the review result of the target image, the data at the target data storage location is updated.
[0114] In some embodiments, the review result of the target image is stored in a preset database, and the result acquisition module 1003 is specifically used to:
[0115] If a storage status code fed back by the preset database is received, the review result of the target image is obtained from the preset database. The storage status code is triggered when the preset database stores the review result of the target image.
[0116] In some embodiments, the preset database includes a Redis database, the search identifier of the target image in the Redis database is a key value, and the audit result of the target image is a value value, and the result acquisition module 1003 is specifically used to:
[0117] The preset thread is called to read the review result of the target image from the Redis database based on the search identifier of the target image.
[0118] In some embodiments, the target data structure includes a progress data structure, and the data updating module 1004 is specifically used to:
[0119] Based on the review result of the target image, the data at the corresponding data storage location in the target data structure is updated to first target data, and the first target data is used to indicate that the review of the target image is completed.
[0120] In some embodiments, the image review device further includes a first judgment module, and the first judgment module is specifically used to:
[0121] When the data at each data storage location in the target data structure are all the first target data, or the number of the first target data in the target data structure is equal to the number of pictures in the target picture set, it is determined that the review of the pictures in the target picture set is completed.
[0122] In some embodiments, the target data structure includes a result data structure, and the data updating module 1004 is specifically used for:
[0123] If the audit result of the target image is that the audit fails, the data at the corresponding data storage location in the target data structure is updated to the second target data, and the second target data is used to indicate that the target image fails the audit;
[0124] If the audit result of the target image is passed, the data at the corresponding data storage location in the target data structure is updated to third target data, and the third target data is used to indicate that the target image has passed the audit.
[0125] In some embodiments, the image review device further includes a second judgment module, and the second judgment module is specifically used to:
[0126] When the second target data exists in the target data structure, or the number of the third target data in the target data structure is not equal to the number of pictures in the target picture set, the target pictures that fail the review are determined based on the data storage location of the second target data.
[0127] From the above content, it can be seen that by obtaining a target picture set to be reviewed that includes at least two pictures, a target data structure corresponding to the target picture set is constructed based on the pictures in the target picture set, and the target data structure includes multiple data storage locations. The data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set. Then, the review result for at least one target picture in the target picture set is obtained, and based on the review result of the target picture, the data at the corresponding data storage location in the target data structure is updated, so that the updated target data structure indicates the latest picture review status in the target picture set, thereby accumulating the review status of the pictures in the target picture set through the target data structure, and the efficiency of determining the review status during multi-picture review can be improved.
[0128] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Alternatively, the electronic device may be a server.
[0129] like Fig.11 As shown, Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1100 includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored in the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0130] The processor 1101 is the control center of the electronic device 1100, and uses various interfaces and lines to connect various parts of the entire electronic device 1100. By running or loading software programs and / or units stored in the memory 1102, and calling data stored in the memory 1102, the processor 1101 executes various functions of the electronic device 1100 and processes data, thereby monitoring the electronic device 1100 as a whole. The processor 1101 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.
[0131] In the embodiment of the present application, the processor 1101 in the electronic device 1100 will load instructions corresponding to the processes of one or more application programs into the memory 1102 according to the following steps, and the processor 1101 will run the application programs stored in the memory 1102 to implement various functions, such as:
[0132] Obtain a target picture set to be reviewed, wherein the target picture set includes at least two pictures;
[0133] Based on the pictures in the target picture set, construct a target data structure corresponding to the target picture set, wherein the target data structure includes a plurality of data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set;
[0134] Obtaining a review result for at least one target image in the target image set;
[0135] Based on the review results of the above-mentioned target images, the data at the corresponding data storage location in the above-mentioned target data structure is updated so that the updated target data structure indicates the latest image review status in the above-mentioned target image set.
[0136] Therefore, the electronic device 1100 provided in this embodiment can bring the following technical effects: improving the efficiency of determining the review status during multi-image review.
[0137] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0138] Optional, such as Fig.11 As shown, the electronic device 1100 further includes: a touch screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107, respectively. Those skilled in the art can understand that Fig.11 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0139] The touch display screen 1103 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 1103 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-EmittingDiode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 1101, and can receive the command sent by the processor 1101 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 1101 to determine the type of touch event, and then the processor 1101 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 1103 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 1103 can also be used as a part of the input unit 1106 to realize the input function.
[0140] The radio frequency circuit 1104 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals between the network device or other electronic devices.
[0141] The audio circuit 1105 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 1105 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 1105 and converted into audio data, and then the audio data is output to the processor 1101 for processing, and then sent to another electronic device through the radio frequency circuit 1104, or the audio data is output to the memory 1102 for further processing. The audio circuit 1105 may also include an earplug jack to provide communication between an external headset and an electronic device.
[0142] The input unit 1106 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0143] The power supply 1107 is used to supply power to various components of the electronic device 1100. Optionally, the power supply 1107 can be logically connected to the processor 1101 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 1107 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0144] although Fig.11 Not shown, the electronic device 1100 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0145] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0146] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0147] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute any one of the image review methods provided in the embodiment of the present application. The computer program can execute the following steps of the image review method:
[0148] Obtain a target picture set to be reviewed, wherein the target picture set includes at least two pictures;
[0149] Based on the pictures in the target picture set, construct a target data structure corresponding to the target picture set, wherein the target data structure includes a plurality of data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set;
[0150] Obtaining a review result for at least one target image in the target image set;
[0151] Based on the review results of the above-mentioned target images, the data at the corresponding data storage location in the above-mentioned target data structure is updated so that the updated target data structure indicates the latest image review status in the above-mentioned target image set.
[0152] It can be seen that the computer program can be loaded by the processor to execute any one of the image review methods provided in the embodiments of the present application, thereby bringing about the following technical effects: improving the efficiency of determining the review status during the review of multiple images.
[0153] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0154] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0155] Since the computer program stored in the computer-readable storage medium can execute any one of the image review methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the image review methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0156] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.
[0157] In the above-mentioned picture review device, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described picture review device, computer-readable storage medium, computer program product, electronic device and its corresponding units can refer to the description of the picture review method in the above embodiment, and will not be repeated here.
[0158] The above is a detailed introduction to a picture review method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for image review, characterized in that: The method comprises: Acquire a target picture set to be reviewed, wherein the target picture set includes at least two pictures; Based on the pictures in the target picture set, construct a target data structure corresponding to the target picture set, wherein the target data structure includes a plurality of data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set; Obtaining a review result for at least one target image in the target image set; Based on the review result of the target picture, the data at the corresponding data storage location in the target data structure is updated so that the updated target data structure indicates the latest picture review status in the target picture set.
2. The image review method according to claim 1, characterized in that: The step of constructing a target data structure corresponding to the target picture set based on the pictures in the target picture set includes: Based on the number of pictures in the target picture set, a target data structure corresponding to the target picture set is constructed.
3. The image review method according to claim 2, characterized in that: The target picture set is configured with a set identifier for indicating the target picture set, and the method further includes: Receive at least one image to be reviewed with a collection logo; If the set identifier of the to-be-reviewed picture is the same as the set identifier of the target picture set, the to-be-reviewed picture is added to the target picture set to update the number of pictures in the target picture set.
4. The image review method according to claim 1, characterized in that: Each picture in the target picture set is configured with a picture sequence number, and constructing a target data structure corresponding to the target picture set based on the pictures in the target picture set includes: Based on the picture sequence number of each picture in the target picture set, a target data structure corresponding to the target picture set is constructed, and a data storage location in the target data structure matches the picture sequence number of a picture in the target picture set.
5. The image review method according to claim 4, characterized in that: The updating of the data at the corresponding data storage location in the target data structure based on the audit result of the target image includes: In the target data structure, determining a target data storage location that matches a picture sequence number of the target picture; Based on the review result of the target image, the data at the target data storage location is updated.
6. The image review method according to claim 1, characterized in that: The review result of the target image is stored in a preset database, and the obtaining of the review result of at least one target image in the target image set includes: If a storage status code fed back by the preset database is received, the review result of the target image is obtained from the preset database, and the storage status code is triggered when the preset database stores the review result of the target image.
7. The image review method according to claim 6, characterized in that: The preset database includes a Redis database, the search identifier of the target image in the Redis database is a key value, and the audit result of the target image is a value value; The step of obtaining the audit result of the target image from the preset database includes: The preset thread is called to read the review result of the target image from the Redis database based on the search identifier of the target image.
8. The image review method according to claim 1, characterized in that: The target data structure includes a progress data structure, and the updating of data at a corresponding data storage location in the target data structure based on the review result of the target image includes: Based on the review result of the target image, the data at the corresponding data storage location in the target data structure is updated to first target data, where the first target data is used to indicate that the review of the target image is complete.
9. The image review method according to claim 8, characterized in that: After updating the data at the corresponding data storage location in the target data structure, the method further includes: When the data at each data storage location in the target data structure are all the first target data, or the number of the first target data in the target data structure is equal to the number of pictures in the target picture set, it is determined that the review of the pictures in the target picture set is completed.
10. The image review method according to claim 1, characterized in that: The target data structure includes a result data structure, and the updating of data at a corresponding data storage location in the target data structure based on the audit result of the target image includes: If the audit result of the target image is that the audit fails, the data at the corresponding data storage location in the target data structure is updated to second target data, where the second target data is used to indicate that the target image fails the audit; If the audit result of the target image is passed, the data at the corresponding data storage location in the target data structure is updated to third target data, and the third target data is used to indicate that the target image has passed the audit.
11. The image review method according to claim 10, characterized in that: After updating the data at the corresponding data storage location in the target data structure, the method further includes: When the second target data exists in the target data structure, or the number of the third target data in the target data structure is not equal to the number of pictures in the target picture set, the target pictures that fail the review are determined based on the data storage location of the second target data.
12. A picture review device, characterized in that: The device comprises: A picture acquisition module, used to acquire a target picture set to be reviewed, wherein the target picture set includes at least two pictures; A construction module, configured to construct a target data structure corresponding to the target picture set based on the pictures in the target picture set, wherein the target data structure includes a plurality of data storage locations, and the data at each of the data storage locations is used to indicate the picture review status of a picture in the target picture set; A result acquisition module, used to obtain the review result of at least one target image in the target image set; The data updating module is used to update the data at the corresponding data storage location in the target data structure based on the review result of the target image, so that the updated target data structure indicates the latest image review status in the target image set.
13. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the image review method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the image review method as described in any one of claims 1 to 11.