Picture tracing method, system, equipment and medium
By assigning unique identifiers to images and combining them with multi-tag storage and sharing information, the problem of scattered and difficult-to-trace image information in traditional photo albums is solved, realizing intelligent image management and data security. Users can efficiently trace the shooting background and sharing history of images.
Patent Information
- Application Number
- CN202511491385.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-18
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional photo albums lack a systematic record of additional information about photos and cannot link the notes stored in the photos, making it difficult for users to trace the subjects and scene details of the photos. At the same time, traditional photo albums lack effective tracking of photo sharing behavior, and cannot record the sharing channels and recipients, making it impossible for users to trace the sharing history.
Each image is assigned a unique identifier. Combining multi-tag association storage and local database records of sharing information, the system enables traceability of images from generation and annotation to sharing through request vector-based source queries. A structured data table design and JSON format are used to store the sharing application name and contact information. The system supports sharing permission control and editing feedback, generates a sharing behavior timeline, and constructs a hybrid index structure with multi-dimensional feature vectors for querying.
It enables structured management of image information, improves the intelligence level of image management, allows users to quickly obtain the tags and complete sharing history of target images, significantly reduces the time cost of searching for image information, enhances the controllability and transparency of the image sharing process, and ensures the security and stability of data.
Smart Images

Figure CN121564385A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and in particular to a method, system, device, and medium for tracing the source of images. Background Technology
[0002] With the widespread adoption of smartphones and the continuous improvement of their photography capabilities, the number of photos taken by users in their daily lives has increased dramatically. Mobile phone photo albums have become a core tool for storing and managing these photos. Photos are not only records of images, but also carry users' life memories, people or scenes from special moments. At the same time, photo sharing is becoming increasingly frequent; users often share photos with others through various social media platforms and communication tools, making photo albums play an important role in personal life and social interaction.
[0003] Currently, mobile photo albums primarily rely on local storage technology to provide basic photo management functions, including photo capture and storage, categorized browsing, simple editing, and sharing to third-party applications. These existing technologies can meet users' basic needs for photo storage and viewing. The efficient read / write capabilities of local databases ensure smooth photo retrieval and display, providing users with a convenient foundation for photo management.
[0004] However, traditional photo albums lack a systematic record of additional information about photos and cannot link the notes stored in the photos, making it difficult for users to trace the subjects and scene details of the photos; in addition, traditional photo albums lack effective tracking of photo sharing behavior, and cannot record the sharing channels and recipients, making it impossible for users to trace the sharing history. Summary of the Invention
[0005] In order to solve the problem that traditional photo albums lack effective means of sharing records and tracing the source of images, this application provides a method, system, device and medium for tracing the source of images.
[0006] Firstly, this application provides a method for tracing the source of an image, including: Obtain the image to be processed, and its unique identifier; Receive tags added by the user to the image to be processed, the tags including one or more; When a sharing operation of the image to be processed is detected, the sharing information corresponding to the sharing operation is obtained. The sharing information includes the name of the target application and the contact information shared through the target application. The unique identifier is associated with the tag and the sharing information and stored in a local database; In response to the source tracing query request, the source tracing query request is parsed and a request vector is generated. Based on the request vector, the target image set and the corresponding unique identifier are retrieved. Based on the unique identifier of the target image set, the corresponding tag and sharing information are obtained from the local database.
[0007] By adopting the above technical solution, unique identifiers are assigned to images. Combined with multi-tag association storage, local database recording of sharing information, and request vector-based source tracing queries, the traceability of images from generation and annotation to sharing is achieved. Multi-tag settings enhance the richness and accuracy of image descriptions, allowing users to quickly associate images with information such as the shooting background through tags. Associating tags with sharing information through unique identifiers enables structured information management, providing a unified data association foundation for subsequent source tracing queries. The request vector-based query method improves the flexibility and accuracy of source tracing queries, enabling users to efficiently obtain the tags and complete sharing records of target images. This effectively solves the problems of scattered and difficult-to-trace image information in traditional photo albums, significantly improving the intelligence level of image management and user experience.
[0008] In one specific implementation, associating the unique identifier with the tag and the sharing information and storing it in a local database includes: Create a data table in the database containing a unique image identifier field, a tag field, a sharing application record field, and a sharing contact record field; The name of the target application in the sharing information is stored in the sharing application record field in JSON format; The contact information in the shared information is stored in the shared contact record field in JSON format and correspondingly stored in the data table.
[0009] By adopting the above technical solution, a data table containing fields for unique image identifiers, tags, sharing application records, and sharing contact records is created in the local database. The sharing application name and contact information are stored in JSON format, achieving structured and standardized storage of image-related data. The structured data table design makes the relationships between data clear and unambiguous, avoiding information storage chaos and redundancy, and improving the orderliness of data management. The JSON format is suitable for storing list-type sharing information, which can completely preserve the sequence relationship of sharing applications and contacts, and has good scalability, adapting to the storage needs of different types of sharing information. This storage method provides an efficient data foundation for subsequent fast queries, data updates, and multi-dimensional analysis, ensuring that the tags and sharing information of target images can be quickly located and extracted during source tracing queries, further improving the efficiency and accuracy of image source tracing, and ensuring the stability of data storage and retrieval.
[0010] In one specific implementation, when a sharing operation of the image to be processed is detected, obtaining the sharing information corresponding to the sharing operation includes: Intercept the sharing operation initiated by the image to be processed, and extract the name of the target application and the corresponding contact information from the sharing operation as the sharing information; Generate sharing permissions, bind the sharing permissions to the contact information and write them into the sharing information. The sharing permissions include viewing permissions, editing permissions, and secondary sharing permissions. The sharing permissions also include a validity period. Based on the sharing permissions, the contact's edits to the shared image are written into the sharing information; Receive the sharing information written by the contact, identify the changed fields of the sharing information, and create a copy of the shared image in the local database based on the changed fields; The shared information written by the contact and the corresponding tag are associated with the unique identifier of the copy and stored in the local database.
[0011] By adopting the above technical solutions, information can be extracted from sharing operations, sharing permissions can be set, editing feedback can be recorded, and edited copies can be stored, enabling refined tracking and management of the entire image sharing process. The design of binding sharing permissions to contacts clarifies the operation permissions of different sharing recipients, effectively protecting the boundaries of image usage; recording the operation feedback of sharing recipients and storing edited copies forms a traceability chain from the original version to derivative versions of the image, allowing users to clearly trace the image's modification history, the subject of modification, and the content of the modification, improving the controllability and transparency of the image sharing process.
[0012] In one specific feasible implementation, the method further includes: Receive user instructions to edit stored tags; Update the tags associated with the unique identifier of the image to be processed in the local database according to the editing instructions; The system receives the user's latest sharing action, merges the currently acquired sharing information with historical sharing information, records the timestamp of each sharing action, generates a sharing behavior timeline based on the timestamps, and updates and stores it in the local database.
[0013] By adopting the above technical solutions, the system supports tag editing, merging shared information, and generating a sharing timeline, enabling dynamic management and visual traceability of image-related information. Users can edit stored tags, allowing tags to be updated in real time according to user needs, ensuring the timeliness and accuracy of tag information and enhancing user autonomy in image description. When merging shared information, deduplication is performed to avoid data redundancy. Simultaneously, timestamps are recorded and a timeline is generated, clearly presenting the image's sharing trajectory and timeline, allowing users to intuitively understand the sharing recipients and applications of images at different points in time, enhancing the readability of the sharing history.
[0014] In one specific implementation, the step of responding to a source tracing query request for a target image, parsing the source tracing query request, and obtaining the unique identifier of the target image includes: Based on the feature vectors of the images stored in the local database, a hybrid index structure is established, wherein the feature vectors include spatiotemporal feature vectors, visual feature vectors, and semantic feature vectors. Receive the source tracing query request and convert it into a request vector based on the structure of the feature vector; The request vector is matched with the hybrid index structure to generate a set of candidate images in the local database, and the unique identifier of each candidate image in the set is returned. If no candidate image matching the request vector exists in the local database, a set of similar images is obtained by combining the association relationship, and the unique identifier of each image in the set of similar images is returned. Based on user feedback on each unique identifier, the vector weights of each feature vector in the hybrid index structure are updated, and the vector weights are used to adjust the order of each image in the candidate image set or the similar image set.
[0015] By adopting the above technical solutions, a hybrid index structure based on multi-dimensional feature vectors is constructed to improve the accuracy and intelligence of source tracing queries. The hybrid index, built based on spatiotemporal, visual, and semantic feature vectors, breaks through the limitations of traditional single-dimensional queries, enabling matching of target images from multiple perspectives and improving the comprehensiveness of the query. When an exact match cannot be achieved, similar images are recommended based on the user's historical preferences to avoid query failures, improving query tolerance and user experience. Continuous optimization of query results gradually improves the personalization and accuracy of queries, providing efficient technical support for users to quickly locate target images.
[0016] In one specific feasible implementation, the method further includes: Based on the stored images in the local database, calculate the text similarity of the tags for each image, and count the overlap of the shared information for each image; When the text similarity is greater than the similarity threshold, or the overlap is greater than the overlap threshold, it is determined that each image belongs to an association set, and the association relationship between the images is established, the association relationship including the association strength score; In response to a source tracing query request for a target image, the tag and sharing information of the target image are obtained, and based on the association strength score, the unique identifiers of other images in the association set are obtained sequentially. Receive user's edit instruction for the association set, and update the association relationship and association strength score in the local database based on the edit instruction.
[0017] By adopting the above technical solutions, association analysis is performed on tags and shared information to construct association sets and support users in editing association relationships, thereby achieving intelligent association and linkage tracking between images. Association sets are formed through the analysis of text similarity and the overlap of shared information; users are allowed to manually edit association relationships, enhancing the flexibility and accuracy of association sets, meeting users' personalized association needs, and improving the systematic nature of album information management.
[0018] In one specific feasible implementation, the method further includes: Set backup trigger conditions. When the backup trigger conditions are met, encrypt the tags and sharing information in the local database to obtain encrypted data. The encrypted data is stored in a local preset secure storage area and an external storage device; When a data recovery command is detected, the encrypted data is retrieved from the local preset secure storage area and the external storage device; Decrypt and verify the encrypted data, and restore the tag and the sharing information to the local database accordingly.
[0019] By adopting the above technical solutions, setting backup trigger conditions, encrypting backup data storage, and supporting data recovery and verification, the security, integrity, and recoverability of image tags and shared information are ensured. Encryption provides security for backup data, effectively preventing information leakage and protecting user privacy; the backup and recovery mechanism provides a stable data foundation for image traceability. In the event of an anomaly in the local database, tags and shared information can be restored through backup data, ensuring the continuity and stability of the traceability function.
[0020] Secondly, this application also provides an image tracing system, including: The receiving module is used to obtain the image to be processed and its unique identifier, and to receive the tags added by the user to the image to be processed; the sharing module is used to obtain the sharing information corresponding to the sharing operation when the sharing operation of the image to be processed is detected; the storage module is used to associate the unique identifier with the tags and the sharing information and store them in a local database. The query module is used to respond to a source tracing query request for a target image and retrieve the corresponding tags and sharing information from the local database based on the unique identifier of the target image.
[0021] By adopting the above technical solutions, the receiving module ensures the accurate acquisition of unique image identifiers and tag information, providing basic data for subsequent processing; the sharing module achieves real-time capture and recording of shared information, ensuring the integrity of sharing behavior traceability; the storage module ensures efficient data management and secure storage through structured storage in a local database; and the query module achieves rapid traceability of target image tags and shared information through precise retrieval and information extraction. The complementary functions and collaborative operation of each module enable the system to stably and efficiently support image identification, sharing records, and traceability queries, improving the intelligent management level of mobile phone photo albums and providing users with convenient, secure, and comprehensive image information traceability services.
[0022] Thirdly, this application also provides an electronic device, including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to enable the electronic device to perform an image tracing method.
[0023] Fourthly, this application also provides a computer-readable storage medium storing multiple instructions adapted for loading and executing an image tracing method by a processor.
[0024] In summary, this application includes at least one of the following beneficial effects: 1. This application constructs a complete image information association system by assigning a unique identifier to each image and storing user-added tags and sharing information in a local database. Users can record various characteristics of images through tags and clearly identify sharing behavior through sharing records; for edited images, the original version and modification details can be traced through copy association. The image tracing method can completely solve the problems of scattered image information, vague memory, and missing sharing records, significantly reducing the time cost for users to find and recall image information, and greatly improving ease of use and user satisfaction.
[0025] 2. This application utilizes structured data tables and JSON format storage to ensure orderly data management and efficient retrieval. Furthermore, for data backup and recovery, the solution incorporates encryption, dual backup via a local secure area and external devices, and other mechanisms to further enhance data resilience and ensure that tags and sharing records can be fully recovered even in the event of device failure, accidental operation, or other unforeseen circumstances. Regarding access control during sharing, binding contacts and operation permissions effectively prevents unauthorized secondary dissemination or malicious modification of images.
[0026] 3. This application's solution uses association analysis to identify sets of images with related relationships, helping users discover potential connections between images. During source tracing queries, it not only displays information about the target image but also recommends related images based on the strength of the association, allowing users to expand from isolated single images to recalling and organizing complete scenes. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating an image tracing method provided in an embodiment of this application. Detailed Implementation
[0028] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0029] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0030] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0031] refer to Figure 1 , Figure 1 This illustration shows a flowchart of an image tracing method provided in an embodiment of this application. This method can be implemented using a computer program, a microcontroller, or run on an image tracing system. The computer program can be integrated into a computer device or run as a standalone utility application. Specifically, the method includes steps S100 to S700, as follows: S100. Obtain the image to be processed and its unique identifier; In this embodiment, the unique identifier is a unique identifier assigned to each image in the local database, used to uniquely correspond to and associate all relevant information of that image. Its core function is to serve as an ID credential for the image in the local database, enabling precise binding, storage, and retrieval of the image with various additional information, ensuring that all records of the corresponding image can be accurately retrieved during the tracing process.
[0032] S200: Receive tags added by the user to the image to be processed, the tags including one or more; In this embodiment of the application, a tag refers to a text-based identifier that the user manually adds to the image to be processed, used to describe key information of the image, and may include one or more tags.
[0033] In some embodiments, tags may include spatiotemporal tags, visual tags, and semantic tags. Spatiotemporal features may include the location and time the image was taken; visual tags may include the specific content of the image; semantic tags may include additional text about the image, such as commemorative or related information entered by the user. The spatiotemporal tags and visual tags can be automatically extracted and generated by the system when the image is taken, and can be supplemented or modified by the user, or can be manually entered by the user.
[0034] In some embodiments, when a user inputs annotation text for an image to be processed, the annotation text can be stored as a semantic tag. The system analyzes the annotation text, decomposing it into spatiotemporal and visual components, which are then stored as spatiotemporal and visual tags for the image to be processed. For example, the user inputs "Thursday, July 10, 2025, saw Event B at Location A". The complete phrase "Thursday, July 10, 2025, watched Event B at Location A" is stored as a semantic tag, used to record the overall background and special meaning of the image. "Thursday, July 10, 2025" and "Location A" are identified from the annotation text and used as time and location tags respectively, combined and stored as a spatiotemporal tag. "Event B" is identified from the annotation text and stored as a visual tag, used to describe the specific content of the image.
[0035] S300. When a sharing operation of the image to be processed is detected, the sharing information corresponding to the sharing operation is obtained. The sharing information includes the name of the target application and the contact information shared through the target application. Based on the above embodiments, as another optional embodiment, when a sharing operation of the image to be processed is detected, obtaining the sharing information corresponding to the sharing operation includes: S301. Intercept the sharing operation initiated by the image to be processed, and extract the name of the target application and the corresponding contact information from the sharing operation as the sharing information; In some embodiments, when a user selects an image to be processed in the photo album and triggers a share command, the photo album listener immediately responds and intercepts the share request. It obtains the context information of the share operation, including the name of the target application and its corresponding contact information.
[0036] In this embodiment of the application, the name of the target application to be shared refers to the third-party application selected by the user for sharing the image, such as WeChat, Weibo, QQ, email, etc., which is obtained by parsing the application package name or the application identifier registered by the system.
[0037] In this embodiment of the application, the corresponding contact information refers to the specific object shared through the target application, such as the nickname / account of a WeChat friend, the recipient's address of an email, etc.
[0038] S302. Generate sharing permissions, bind the sharing permissions to the contact information and write them into the sharing information. The sharing permissions include viewing permissions, editing permissions, and secondary sharing permissions, and the sharing permissions include a validity period. In this embodiment, sharing permissions refer to the scope of operation and time limits set for different sharing objects for the image to be processed, used to regulate the use of the image after sharing and avoid unauthorized abuse or modification. Sharing permissions may include viewing permissions, editing permissions, and secondary sharing permissions, and the sharing permissions include a validity period.
[0039] Specifically, viewing permission allows the recipient to only browse the image content without editing or forwarding it; editing permission allows the recipient to modify the image, such as cropping, adding filters, or annotating it, but the modifications are only reflected in the copy and do not affect the original image; secondary sharing permission restricts whether the recipient can share the image again with other third parties; and permission validity period sets the effective duration of the above permissions, such as 24 hours, 7 days, or permanently. After expiration, the permissions will automatically expire to avoid the risks associated with long-term authorization.
[0040] When a sharing operation is intercepted, the contact information is extracted, and the system generates sharing permissions corresponding to that contact. Sharing permissions can be manually selected by the user during sharing, or the system can use a default permission policy. The "contact information + corresponding sharing permissions" are encapsulated as structured data. This structured data is used as a component of the sharing information, and together with information such as the name of the target application, it is linked to a unique image identifier and stored in the sharing application record field and sharing contact record field in the local database, ensuring a one-to-one correspondence between permission information and sharing behavior.
[0041] S303. Based on the sharing permissions, write the contact's edits to the shared image into the sharing information; When a contact modifies a shared image according to the granted editing permissions, the system will capture the editing behavior in real time and associate the specific content of the edit, the operation time, the operator, and other information with the original sharing information to form a complete sharing information containing the editing record.
[0042] In some embodiments, by listening to image operation events in the target application, it can be identified whether a contact has triggered an editing operation, ensuring that recording is only done within the scope permitted by permissions. The operation time may include the invocation of editing tools and the saving of modification instructions; Based on the identified editing operation, extract editing data from the operation. Editing data may include: editing type (e.g., cropping, adding text); differences in content before and after editing (e.g., coordinates of the cropped area, added text content); editing timestamp; and the contact identifier who performed the edit. The extracted editing information is appended to the original shared information in a structured form and associated with the image's unique identifier, and then updated and stored in the local database.
[0043] In some embodiments, the edited information can be obtained in real time by the server through the same sharing application used by the user and the contact, or it can be obtained locally by recognizing the edited image that the contact has shared with the user a second time.
[0044] S304. Receive the sharing information written by the contact, identify the changed fields of the sharing information, and create a copy of the shared image in the local database based on the changed fields; In some embodiments, the system receives sharing information after a contact has edited the content, parses the changes in the sharing information, and identifies the changed fields compared to the original sharing information. These changed fields include the binary data of the image edited by the contact, and the text of tags added by the contact.
[0045] S305. The shared information written by the contact and the corresponding tag are associated with the unique identifier of the copy and stored in the local database.
[0046] A derived identifier is generated for the copy image. This derived identifier is associated with the unique identifier of the original image and serves as the unique identifier for the copy image. The copy image refers to a replica of the original image generated from the local database, i.e., the image edited by the contact, used to distinguish it from the original image locally. The derived identifier consists of a suffix added to the original identifier.
[0047] The derived identifier of the copy image, the edited image data, the details of the changed fields, and other information are associated with the unique identifier of the original image and then stored in the corresponding data table of the local database.
[0048] S400: Associate the unique identifier with the tag and the sharing information, and store them in a local database; Based on the above embodiments, as another optional embodiment, the step of associating the unique identifier with the tag and the sharing information and storing it in a local database includes: creating a data table in the database containing an image unique identifier field, a tag field, a sharing application record field, and a sharing contact record field; storing the sharing target application name in the sharing information in JSON format in the sharing application record field; and storing the contact information in the sharing information in JSON format in the sharing contact record field, and correspondingly storing it in the data table.
[0049] In some embodiments, a local database SQLite can be used to store the image data table, with the data structure defined as follows: field name type describe imageId TEXT Image unique identifier desc TEXT Image tag information appRecord TEXT Shared application records (JSON format) wxRecord TEXT Shared WeChat contact records (JSON format) Code snippets can include: String createTableSQL="CREATE TABLE IF NOT EXISTS image_share_record("+ "imageId TEXT PRIMARY KEY,"+ "desc TEXT,"+ "appRecord TEXT,"+ "wxRecord TEXT)"; db.execSQL(createTableSQL); String insertSQL="INSERT INTO image_share_record(imageId,desc,appRecord,wxRecord)VALUES(?,?,?,?)"; db.execSQL(insertSQL,new Object[]{imageId,desc,appRecordJson,wxRecordJson}) Based on the above embodiments, as another optional embodiment, the image tracing method may further include: S401. Based on the stored images in the local database, calculate the text similarity of the tags of each image, and count the overlap of the shared information of each image; In some embodiments, image tags are preprocessed, which may include removing punctuation and stop words, extracting keywords; converting keywords into vectors using a term frequency-inverse text frequency index algorithm; and calculating the cosine value of the angle between the vectors using the cosine similarity formula, with a value ranging from 0 to 1, representing text similarity. Here, 1 indicates identical text, and 0 indicates completely unrelated text.
[0050] In some embodiments, the JSON data of the appRecord and wxRecord fields in each image data table is parsed to extract the list of sharing applications and the list of contacts. For every two images, the application overlap and contact overlap are calculated. The application overlap is calculated as the number of identical applications / the total number of applications, and the contact overlap is calculated as the number of identical contacts / the total number of contacts. The average of the application overlap and contact overlap is taken as the overlap of the shared information, with a value ranging from 0 to 1.
[0051] S402. When the text similarity is greater than a similarity threshold, or the overlap is greater than an overlap threshold, it is determined that each image belongs to an association set, and an association relationship is established between the images. The association relationship includes an association strength score. In some embodiments, an association table is added to the local database. The association table fields include a unique identifier for the main image, a unique identifier for the associated image, and an association type. The association type may include similar tags and overlapping sharing. Iterate through all image combinations. For image combinations with text similarity greater than the similarity threshold (e.g., 0.7) or shared information overlap greater than the overlap threshold (e.g., 0.5), record each field of the association table in the association table to form an association set.
[0052] In the associated set, generate the association relationship between any two images, calculate the association strength score between any two images, and store it in the association table field.
[0053] In some embodiments, the formula for calculating the association strength score can be: Association strength score = α * text similarity + β * overlap Where α is the text similarity weight coefficient, β is the overlap weight coefficient, and the association strength score is a score of 0-100; in some embodiments, α and β can be 60 and 40 respectively. Add a new field for association strength score to the association table to store the calculation results.
[0054] S403. In response to a source tracing query request for a target image, obtain the tag and sharing information of the target image, and based on the association strength score, sequentially obtain the unique identifiers of other images in the association set; obtain the tag and sharing information of the target image, and query each association set to which the target image belongs. In each association set, provide the unique identifiers of other images associated with the target image, wherein the unique identifiers of the associated other images can be sorted according to the association strength score.
[0055] S404. Receive the user's editing instruction for the association set, and update the association relationship and the association strength score in the local database based on the editing instruction.
[0056] In some embodiments, editing instructions for association sets may include adding or deleting associated images, adjusting association strength, merging or splitting association sets, etc., to correct deviations in associations generated by the system or to supplement associations not recognized by the system.
[0057] In some embodiments, when the system misjudges a correlation, the user can delete the incorrect correlation; when the system fails to identify a potential correlation, the user can manually add the correlation; and the user can adjust the correlation strength score based on subjective perception.
[0058] S600. In response to a source tracing query request for a target image, parse the source tracing query request and generate a request vector, and based on the request vector, query and obtain the unique identifier of the target image; Based on the above embodiments, as another optional embodiment, the step of responding to a source tracing query request for a target image, parsing the source tracing query request and generating a request vector, and querying and obtaining the unique identifier of the target image based on the request vector includes: S601. Based on the feature vectors of the images stored in the local database, establish a hybrid index structure, wherein the feature vectors include spatiotemporal feature vectors, visual feature vectors, and semantic feature vectors. In this embodiment of the application, a feature vector refers to a computer-processable multidimensional numerical vector. Spatiotemporal feature vectors may include the shooting time and geographical location, reflecting the spatiotemporal attributes of the image; visual feature vectors can extract visual content such as the color histogram and feature points of the image, representing the visual features of the image; semantic feature vectors can be transformed into semantic vectors through text recognition and image classification.
[0059] In some embodiments, spatiotemporal feature vectors, visual feature vectors, and semantic feature vectors can be generated by recognizing user-inputted labels and correspond to spatiotemporal labels, visual labels, and semantic labels.
[0060] In this embodiment of the application, the hybrid index structure refers to a multi-dimensional indexing system that combines spatiotemporal feature vectors, visual feature vectors, and semantic feature vectors, for the efficient retrieval and matching of different feature vectors of images.
[0061] S602. Receive the source tracing query request and convert it into a request vector based on the structure of the feature vector; The system receives source tracing query requests and converts them into request vectors that include spatiotemporal features, visual features, and semantic features. For example, if a user inputs a source tracing query request for "Aerial photo of Location A, Activity B in 2025", the system identifies the spatiotemporal features as 2025 and Location A, the visual feature as Activity B, and the semantic feature as Aerial photo.
[0062] S603. Match the request vector with the hybrid index structure to generate a candidate image set in the local database, and return the unique identifier of each candidate image set; The transformed request vector is input into a hybrid index structure, which combines spatiotemporal feature vectors, visual feature vectors, and semantic feature vectors for matching. When the feature vector of the target image matches, the target image is selected as a candidate image, and a candidate image set is generated. For example, if the user's source tracing query request is "viewing event B from location A in 2025", images for "location A in 2025", "event B", and "aerial photography" are matched sequentially, added to the candidate image set, and output.
[0063] S604. When the local database does not have a candidate image that matches the request vector, a set of similar images is obtained by combining the association relationship, and the unique identifier of each image in the set of similar images is returned. If no candidate image matches all three spatiotemporal, visual, and semantic features of the request vector, similar images are obtained based on the spatiotemporal, visual, and semantic features of the request vector, combined with the association relationships. Specifically, if a candidate image matches any two of the three features of the request vector, a similar image is obtained based on the remaining feature, combined with the association relationships; if a candidate image matches any one of the three features of the request vector, a similar image is obtained based on the remaining two features, combined with the association relationships.
[0064] S605. Based on user feedback on each of the unique identifiers, update the vector weights of each feature vector in the hybrid index structure. The vector weights are used to adjust the order of each image in the candidate image set or the similar image set.
[0065] Based on unique identifiers, the candidate image set or similar image set is transformed into a user-viewable format via the client. The system receives user viewing operations on the candidate image set or similar image set and updates the weights of each feature vector in the hybrid index structure. Specifically, by adjusting the weights, the ranking of images in the candidate image set or similar image set is adjusted. For example, increasing the weight of the spatiotemporal feature vector will rank images matching the spatiotemporal feature vector at the top of the candidate image set or similar image set.
[0066] S700. Based on the unique identifier, retrieve the corresponding tag and sharing information from the local database.
[0067] Based on the above embodiments, as another optional embodiment, the image tracing method may further include: receiving a user's editing instruction for stored tags; updating the tags associated with the unique identifier of the image to be processed in the local database according to the editing instruction; receiving the user's latest sharing operation, merging the currently acquired sharing information with historical sharing information, recording the timestamp of each sharing operation, generating a sharing behavior timeline based on the timestamp, and updating and storing it in the local database.
[0068] In some embodiments, the sharing timeline may include sharing information following each sharing operation. Based on this sharing information, copies of the image can be generated after each sharing operation.
[0069] Based on the above embodiments, as another optional embodiment, the image tracing method may further include: setting backup trigger conditions; when the backup trigger conditions are met, encrypting the tags and sharing information in the local database to obtain encrypted data; storing the encrypted data in a local preset secure storage area and an external storage device; when a data recovery command is detected, retrieving the encrypted data from the local preset secure storage area and the external storage device; decrypting and verifying the encrypted data, and restoring the tags and sharing information to the local database accordingly.
[0070] This application embodiment also provides an image tracing system based on an image tracing method. The system includes: a receiving module for acquiring an image to be processed and its unique identifier, and receiving tags added by a user to the image to be processed; a sharing module for acquiring sharing information corresponding to the sharing operation when a sharing operation of the image to be processed is detected; and a storage module for associating the unique identifier with the tags and the sharing information and storing them in a local database. The query module is used to respond to a source tracing query request for a target image and retrieve the corresponding tags and sharing information from the local database based on the unique identifier of the target image.
[0071] In some embodiments, the sharing module can also be used to generate a copy of the image after it has been shared.
[0072] Based on the above embodiments, as another optional embodiment, this application embodiment may further include a computer storage medium, which may store multiple instructions. The instructions are adapted to be loaded by a processor and executed as an image tracing method of the above embodiments. For the specific execution process, please refer to the detailed description of the above embodiments, which will not be repeated here.
[0073] Based on the above embodiments, as another optional embodiment, this application embodiment may further include an electronic device. The electronic device may include: at least one processor, at least one communication bus, a user interface, at least one network interface, and a memory.
[0074] The communication bus is used to enable communication between these components.
[0075] The user interface may include a display screen and a camera. Optional user interfaces may also include standard wired interfaces and wireless interfaces.
[0076] The network interface may include standard wired interfaces and wireless interfaces (such as Wi-Fi interfaces).
[0077] The processor may include one or more processing cores. It connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various server functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0078] The memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor. As a computer storage medium, the memory may include an operating system, a network communication module, a user interface module, and an application program for an image tracing method.
[0079] In electronic devices, the user interface is primarily used to provide an input interface for users and to acquire user input data; while the processor can be used to call an application program stored in memory that provides an image tracing method. When executed by one or more processors, this causes the electronic device to perform one or more methods as described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0080] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0081] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0082] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0083] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0084] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0085] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will readily conceive of those skilled in the art upon consideration of the specification and the disclosure of practical truths.
[0086] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method for tracing the source of an image, characterized in that, include: Obtain the image to be processed, and its unique identifier; Receive tags added by the user to the image to be processed, the tags including one or more; When a sharing operation of the image to be processed is detected, the sharing information corresponding to the sharing operation is obtained. The sharing information includes the name of the target application and the contact information shared through the target application. The unique identifier is associated with the tag and the sharing information and stored in a local database; In response to the source tracing query request, the source tracing query request is parsed and a request vector is generated. Based on the request vector, the target image set and the corresponding unique identifier are retrieved. Based on the unique identifier of the target image set, the corresponding tag and sharing information are obtained from the local database.
2. The image source tracing method according to claim 1, characterized in that, The step of associating the unique identifier with the tag and the sharing information and storing it in a local database includes: Create a data table in the database containing a unique image identifier field, a tag field, a sharing application record field, and a sharing contact record field; The name of the target application in the sharing information is stored in the sharing application record field in JSON format; The contact information in the shared information is stored in the shared contact record field in JSON format and correspondingly stored in the data table.
3. The image source tracing method according to claim 1, characterized in that, When a sharing operation of the image to be processed is detected, obtaining the sharing information corresponding to the sharing operation includes: Intercept the sharing operation initiated by the image to be processed, and extract the name of the target application and the corresponding contact information from the sharing operation as the sharing information; Generate sharing permissions, bind the sharing permissions to the contact information and write them into the sharing information. The sharing permissions include viewing permissions, editing permissions, and secondary sharing permissions. The sharing permissions also include a validity period. Based on the sharing permissions, the contact's edits to the shared image are written into the sharing information; Receive the sharing information written by the contact, identify the changed fields of the sharing information, and create a copy of the shared image in the local database based on the changed fields; The shared information written by the contact and the corresponding tag are associated with the unique identifier of the copy and stored in the local database.
4. The image source tracing method according to claim 1, characterized in that, Also includes: Receive user instructions to edit stored tags; Update the tags associated with the unique identifier of the image to be processed in the local database according to the editing instructions; The system receives the user's latest sharing action, merges the currently acquired sharing information with historical sharing information, records the timestamp of each sharing action, generates a sharing behavior timeline based on the timestamps, and updates and stores it in the local database.
5. The image source tracing method according to claim 1, characterized in that, In response to a source tracing query request for a target image, the source tracing query request is parsed and a request vector is generated. Based on the request vector, the unique identifier of the target image is retrieved, including: Based on the feature vectors of the images stored in the local database, a hybrid index structure is established, wherein the feature vectors include spatiotemporal feature vectors, visual feature vectors, and semantic feature vectors. Receive the source tracing query request and convert it into a request vector based on the structure of the feature vector; The request vector is matched with the hybrid index structure to generate a set of candidate images in the local database, and the unique identifier of each candidate image in the set is returned. If no candidate image matching the request vector exists in the local database, a set of similar images is obtained by combining the association relationship, and the unique identifier of each image in the set of similar images is returned. Based on user feedback on each unique identifier, the vector weights of each feature vector in the hybrid index structure are updated, and the vector weights are used to adjust the order of each image in the candidate image set or the similar image set.
6. The image source tracing method according to claim 1, characterized in that, Also includes: Based on the stored images in the local database, calculate the text similarity of the tags for each image, and count the overlap of the shared information for each image; When the text similarity is greater than the similarity threshold, or the overlap is greater than the overlap threshold, it is determined that each image belongs to an association set, and the association relationship between the images is established, the association relationship including the association strength score; In response to a source tracing query request for a target image, the tag and sharing information of the target image are obtained, and based on the association strength score, the unique identifiers of other images in the association set are obtained sequentially. Receive user's edit instruction for the association set, and update the association relationship and association strength score in the local database based on the edit instruction.
7. The image source tracing method according to claim 1, characterized in that, Also includes: Set backup trigger conditions. When the backup trigger conditions are met, encrypt the tags and sharing information in the local database to obtain encrypted data. The encrypted data is stored in a local preset secure storage area and an external storage device; When a data recovery command is detected, the encrypted data is retrieved from the local preset secure storage area and the external storage device; Decrypt and verify the encrypted data, and restore the tag and the sharing information to the local database accordingly.
8. An image source tracing system, characterized in that, The image tracing method according to any one of claims 1-7 includes: The receiving module is used to obtain the image to be processed and its unique identifier, and to receive the tags added by the user to the image to be processed; The sharing module is used to obtain the sharing information corresponding to the sharing operation when a sharing operation of the image to be processed is detected. The storage module is used to associate the unique identifier with the tag and the sharing information and store them in a local database; The query module is used to respond to a source tracing query request for a target image and retrieve the corresponding tags and sharing information from the local database based on the unique identifier of the target image.
9. An electronic device, characterized in that, It includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted to be loaded by a processor and executed as described in any one of claims 1-7.