CN113407741B - Material management method, device, electronic equipment and storage medium - Google Patents

Material management method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113407741B
CN113407741B CN202110624890.3A CN202110624890A CN113407741B CN 113407741 B CN113407741 B CN 113407741B CN 202110624890 A CN202110624890 A CN 202110624890A CN 113407741 B CN113407741 B CN 113407741B
Authority
CN
China
Prior art keywords
state information
sub
information
target
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110624890.3A
Other languages
Chinese (zh)
Other versions
CN113407741A (en
Inventor
张曦
张悦
李令斌
陈连格
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202110624890.3A priority Critical patent/CN113407741B/en
Publication of CN113407741A publication Critical patent/CN113407741A/en
Application granted granted Critical
Publication of CN113407741B publication Critical patent/CN113407741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/41Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0276Advertisement creation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a material management method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: storing a plurality of materials and state information of each material in the same database, wherein the state information comprises sub-state information corresponding to a plurality of application program identifications; in response to receiving a state change notification of any material, acquiring a target application program identifier and target sub-state information carried in the state change notification, wherein the target sub-state information is used for representing the state of the material after being changed in the target application program; the sub-state information corresponding to the target application program identifier in the state information of the material is updated based on the target sub-state information, the state of the same material in different application programs can be managed, data redundancy caused by the fact that the same material is repeatedly stored in different databases is avoided, the state information of the material with the changed state is updated in a self-adaptive mode, the material management efficiency is improved, and the storage space is saved.

Description

Material management method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for managing a material, an electronic device, and a storage medium.
Background
At present, advertisements need to be made in a plurality of scenes, the advertisements can be put into different application programs, and the making processes of the advertisements are different aiming at the different application programs. In the related art, each application program has a corresponding database, the database includes materials related to the application program, and advertisements made according to the materials in the database can be delivered to the application program. However, the material included in different databases may be the same, resulting in the same material being repeatedly stored in different databases, causing data redundancy, resulting in a waste of storage space.
Disclosure of Invention
The embodiment of the application provides a material management method and device, electronic equipment and a storage medium, wherein a plurality of materials are stored in the same database, the states of the same material in different application programs can be managed, data redundancy and storage space waste caused by the fact that the same material is repeatedly stored in different databases are avoided, material management efficiency is improved, and storage space is saved. The technical scheme is as follows:
in one aspect, a method for managing material is provided, and the method includes:
storing a plurality of materials and state information of each material in the same database, wherein the state information comprises sub-state information corresponding to a plurality of application program identifications, each sub-state information is used for representing the state of the material in the application program indicated by the corresponding application program identification, and each application program is used for delivering multimedia data made of the material;
in response to receiving a state change notification of any material, acquiring a target application program identifier and target sub-state information carried in the state change notification, wherein the target application program identifier is used for indicating a target application program, and the target sub-state information is used for representing the state of the material after the material is changed in the target application program;
and updating the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information.
In one possible implementation, before storing the plurality of materials and the state information of each material in the same database, the method further includes:
the method comprises the steps of obtaining a plurality of materials and material description information of each material, wherein the material description information comprises at least one content field, and each content field is used for describing the content of the corresponding material;
adding a state field for each material description information;
and adding state information in the state field of each material description information to obtain a plurality of material description information added with the state information.
In another possible implementation, an application id corresponds to a first target number of bits in the state information, where the first target number is used to represent a maximum number of states in which any material appears in any application; adding a state field for each material description information includes:
obtaining the product of the number of the plurality of application programs and the first target number;
and adding a field with the bit number equal to the product to each material description information as a state field of the material description information.
In another possible implementation manner, the state information includes a plurality of information storage regions arranged in a left-to-right order, and each information storage region corresponds to an application program identifier and is used for storing the material and the sub-state information corresponding to the application program identifier;
before updating the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information, the method further includes:
acquiring an information storage area corresponding to the target application program identifier from a plurality of information storage areas included in the state information of the material as a target storage area;
acquiring the sub-state information stored in the target storage area as the sub-state information corresponding to the target application program identifier in the state information of the material.
In another possible implementation manner, the updating, based on the target sub-state information, the sub-state information corresponding to the target application identifier in the state information of the material includes:
acquiring sub-state information on an information storage area located before the target storage area from the plurality of information storage areas as first sub-state information;
acquiring sub-state information on an information storage area located behind the target storage area from the plurality of information storage areas as second sub-state information;
and combining the first sub-state information, the target sub-state information and the second sub-state information in sequence to obtain the updated state information of the material.
In another possible implementation manner, each information storage area includes a plurality of bits, each bit has a value, and the values on the plurality of bits belonging to the same information storage area are combined to form sub-state information of the corresponding application program;
the acquiring, from the plurality of information storage areas, sub-status information on an information storage area located before the target storage area as first sub-status information includes:
acquiring the sum of the bit number of the target storage area and the bit number behind the target storage area in the state information as a second target number;
and performing right shift processing on the state information of the material based on the second target quantity to obtain the first sub-state information.
In another possible implementation manner, the acquiring, from the plurality of information storage areas, sub-status information on an information storage area located after the target storage area as second sub-status information includes:
acquiring low-order mask information corresponding to the sub-state information stored in the target storage area, wherein the low-order mask information is used for reserving the sub-state information behind the target storage area in the state information of the material;
and carrying out bitwise AND processing on the low-order mask information and the state information of the material to obtain the second sub-state information.
In another possible implementation manner, the merging the first sub-state information, the target sub-state information, and the second sub-state information in order to obtain the updated state information of the material includes:
performing left shift processing on the first sub-state information based on the second target number, so that the value of the second target number of bits after the first sub-state information is 0, and obtaining third sub-state information;
acquiring the number of bits behind the target storage area in the state information as a third target number;
performing leftward shift processing on the target sub-state information based on the third target number to enable a value of a bit number of the third target number behind the target sub-state information to be 0, so as to obtain fourth sub-state information;
and carrying out bitwise processing or treatment on the third sub-state information, the fourth sub-state information and the second sub-state information to obtain the updated state information of the material.
In one aspect, there is provided a material management apparatus, the apparatus including:
the storage module is used for storing a plurality of materials and state information of each material in the same database, wherein the state information comprises sub-state information corresponding to a plurality of application program identifiers, each sub-state information is used for representing the state of the material in the application program indicated by the corresponding application program identifier, and each application program is used for delivering multimedia data made of the material;
the state information acquisition module is used for responding to a received state change notification of any material, and acquiring a target application program identifier and target sub-state information carried in the state change notification, wherein the target application program identifier is used for indicating a target application program, and the target sub-state information is used for representing the state of the material after being changed in the target application program;
and the updating module is used for updating the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information.
In one possible implementation, the apparatus further includes:
the system comprises a description information acquisition module, a display module and a display module, wherein the description information acquisition module is used for acquiring a plurality of materials and material description information of each material, the material description information comprises at least one content field, and each content field is used for describing the content of the corresponding material;
the field adding module is used for adding a state field for each material description information;
and the information adding module is used for adding state information in the state field of each material description information to obtain a plurality of material description information added with the state information.
In another possible implementation, an application identifier corresponds to a first target number of bits in the state information, where the first target number is used to represent a maximum number of states that any material appears in any application; the field adding module comprises:
a product acquisition unit configured to acquire a product of the number of the plurality of application programs and the first target number;
and the field adding unit is used for adding a field with the number of bits equal to the product for each material description information as a state field of the material description information.
In another possible implementation manner, the state information includes a plurality of information storage regions arranged in a left-to-right order, and each information storage region corresponds to an application program identifier and is used for storing the material and the sub-state information corresponding to the application program identifier;
the device further comprises:
the area acquisition module is used for acquiring an information storage area corresponding to the target application program identifier from a plurality of information storage areas included in the state information of the material as a target storage area;
and the sub-state information acquisition module is used for acquiring the sub-state information stored in the target storage area as the sub-state information corresponding to the target application program identifier in the state information of the material.
In another possible implementation manner, the update module includes:
a first acquisition unit configured to acquire, from among the plurality of information storage areas, sub-status information on an information storage area located before the target storage area as first sub-status information;
a second acquisition unit configured to acquire, as second sub-state information, sub-state information on an information storage area located after the target storage area from among the plurality of information storage areas;
and the merging unit is used for merging the first sub-state information, the target sub-state information and the second sub-state information in sequence to obtain the updated state information of the material.
In another possible implementation manner, each information storage area includes a plurality of bits, each bit has a value, and the values on the plurality of bits belonging to the same information storage area are combined to form sub-state information of the corresponding application program;
the first obtaining unit is further configured to obtain, as a second target number, a sum of the number of bits of the target storage area and the number of bits after the target storage area in the status information; and performing right shift processing on the state information of the material based on the second target quantity to obtain the first sub-state information.
In another possible implementation manner, the second obtaining unit is further configured to obtain low-order mask information corresponding to the sub-state information stored in the target storage area, where the low-order mask information is used to reserve sub-state information located after the target storage area in the state information of the material; and carrying out bitwise AND processing on the low-order mask information and the state information of the material to obtain the second sub-state information.
In another possible implementation manner, the merging unit is further configured to perform left shift processing on the first sub-state information based on the second target number, so that a value on a second target number of bits after the first sub-state information is 0, and obtain third sub-state information;
the merging unit is further configured to obtain, as a third target number, the number of bits after the target storage area in the state information;
the merging unit is further configured to perform left shift processing on the target sub-state information based on the third target number, so that a value of a bit of the third target number located after the target sub-state information is 0, and obtain fourth sub-state information;
the merging unit is further configured to perform bitwise processing or processing on the third sub-state information, the fourth sub-state information, and the second sub-state information to obtain state information after the material is updated.
In one aspect, an electronic device is provided that includes one or more processors and one or more memories having stored therein at least one instruction that is loaded and executed by the one or more processors to perform an operation performed by a material management method as described in any one of the possible implementations.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the operations performed by the material management method according to any one of the above possible implementations.
In another aspect, a computer program product is provided, which includes at least one program code, and the program code is loaded by a processor and executed to implement the operations performed by the material management method according to any of the above possible implementation manners.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
according to the material management method and device, the electronic equipment and the storage medium, the states of the same material in different application programs are managed by storing the state information of the materials in the same database, the waste of data redundancy and storage space caused by the fact that the same material is repeatedly stored in different databases is avoided, and under the condition that the state of any material in any application program is changed, the state information of the material can be updated in a self-adaptive mode, the material management efficiency is improved, the storage space is saved, and the operation performance of the equipment is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a material management method according to an embodiment of the present application;
FIG. 2 is a flow chart of another material management method provided in the embodiments of the present application;
FIG. 3 is a diagram illustrating status information provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of another status information provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of another status information provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of another status information provided by an embodiment of the present application;
FIG. 7 is a flow chart of another material management method provided by the embodiments of the present application;
fig. 8 is a schematic structural diagram of a material management apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another material management apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a terminal provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the following detailed description of the embodiments of the present application will be made with reference to the accompanying drawings.
Fig. 1 is a flowchart of a material management method provided in an embodiment of the present application, and is applied to an electronic device, with reference to fig. 1, the embodiment includes:
in step 101, a plurality of materials and status information for each material are stored in the same database.
The material in the embodiment of the application is used as a manufacturing element of the multimedia data, and can be applied to manufacturing of the multimedia data, the manufactured multimedia data can be put into different application programs, each material has state information, the state information is used for describing the state of the corresponding material in each application program, the state information comprises a plurality of sub-state information corresponding to the application program identifier, the application program identifier is used for indicating the application program, and each sub-state information has the corresponding application program identifier and represents the state of the material in the corresponding application program.
In step 102, in response to receiving a state change notification for any material, a target application program identifier and target sub-state information carried in the state change notification are acquired.
Under the condition that the state of any material in any application program changes, the electronic equipment receives a state change notification indicating the state of the material changes, and responds to the state change notification to acquire a target application program identifier and target sub-state information carried in the state change notification.
The target application program identifier is used for indicating a target application program, the target application program is an application program with the changed state of the material, and the target sub-state information is used for representing the changed state of the material in the target application program.
In step 103, the sub-state information corresponding to the target application id in the state information of the material is updated based on the target sub-state information.
The state information of the material comprises a plurality of sub-state information, and the target sub-state information represents the changed state of the material in the target application program, so that the state information of the material can be updated by replacing the sub-state information corresponding to the target application program identifier in the state information of the material with the target sub-state information, and the updated state information of the material can be obtained.
The sub-state information corresponding to the target application program identifier in the state information of the material is the state information of the material before the state of the material is changed in the target application program.
For example, the status information of the material includes sub-status information 1, sub-status information 2, and sub-status information 3, and sub-status information 1 corresponds to program identification 1, sub-status information 2 corresponds to program identification 2, and sub-status information 3 corresponds to program identification 3. The received state change notification of the material carries the program identifier 2 and the target sub-state information, so that the sub-state information 2 is replaced by the target sub-state information to obtain updated state information of the material, wherein the updated state information comprises sub-state information 1, the target sub-state information and sub-state information 3.
According to the material management method provided by the embodiment of the application, the states of the same material in different application programs are managed by storing the state information of the plurality of materials and each material in the same database, the waste of data redundancy and storage space caused by the fact that the same material is repeatedly stored in different databases is avoided, and under the condition that the state of any material in any application program is changed, the state information of the material can be adaptively updated, so that the material management efficiency is improved, the storage space is saved, and the operation performance of equipment is improved.
Fig. 2 is a flowchart of a material management method provided in an embodiment of the present application, and is applied to an electronic device, where the electronic device may be a terminal or a server, and the terminal may be a mobile phone, a personal computer, a tablet computer, and other various devices. The server may be a server, a server cluster composed of a plurality of servers, or a cloud computing server center, which is not specifically limited in this embodiment of the present application. Referring to fig. 2, the embodiment includes:
201. a plurality of materials and material description information of each material are acquired.
At present, multimedia data need to be manufactured in a plurality of scenes, the manufactured multimedia data can be released into different application programs for popularization, and due to the fact that audience groups of the different application programs are different, the released multimedia data also have certain differences aiming at the different application programs in order to improve the conversion rate of the released multimedia data. The production process of multimedia data requires various materials, and the production process of multimedia data and the required materials are different for different applications. The same material can be applied to the manufacturing process of different multimedia data, the states presented after the same material is put into an application program are different, and how to manage various materials has very important significance. Therefore, the embodiment of the application provides a material management method, and the multiple materials and the state information of each material are stored in the same database for management, so that data redundancy can be avoided, the material management efficiency is improved, and the storage space is saved.
The state of the material in the application program may include one or more of a dominant state, a hidden state, a valid state, an online state, and a to-be-online state, and may further include other states, which is not specifically limited in this embodiment of the application. Material has an explicit state representation in the application: the multimedia data put into the application program are manufactured based on the material, and the material is displayed in the application program; the material has an invisible state representation in the application program: the multimedia data put into the application program is not manufactured based on the material, and the material is not shown in the application program; the material has effectiveness representation in the application program: the material can be applied to the manufacturing process of the multimedia data delivered to the application program; the material is represented in the application program in an on-line state: the material is already applied to the manufacturing process of the multimedia data delivered to the application program and can be displayed in the application program; the material is represented in the application program in an offline state: the material is to be applied to the manufacturing process of the multimedia data launched in the application program, or the material is already applied to the manufacturing process of the multimedia data launched in the application program, but the multimedia data is to be displayed in the application program.
In the embodiment of the application, a plurality of materials and material description information of each material are firstly obtained, wherein the material description information comprises at least one content field, and each content field is used for describing the content of the corresponding material. The material description information includes one or more of format information, belonging category information, storage space information, and color information, and may further include other description information.
The format information is used for describing the format of the material, and can be a picture format, a video format, an audio format or other types of formats; the belonging category information is used for describing the category to which the content of the material belongs, and can be a human object category, an animal category, a stationery category, a furniture category, a food category, a clothing category and the like; the storage space information is used for describing the storage space occupied by the material; the color information is used to describe the color contained in the content of the material.
For example, the material description information of the material a includes format information, belonging category information, and color information, and it can be known from the material description information that the material a is in a picture format, belongs to a furniture category, specifically a sofa, and has a black color.
Each application program related in the embodiment of the application has a corresponding application program identifier, and the application program identifier is used for determining a unique application program and can be the name, factory code, identity number of a developer, mobile phone number or other identifiers of the application program.
202. A status field is added for each material description information.
In order to manage the states of the multiple materials in the multiple application programs, in the embodiment of the present application, after the material description information of the multiple materials is obtained, a state field is added to each material description information, so as to subsequently add the state information to the materials based on the state field to describe the states of the materials.
In one possible implementation, each material may be applied to a plurality of applications, corresponding to a plurality of application identifications, having respective states in the plurality of applications. The state information has a plurality of bits, each bit having a corresponding value thereon for indicating the state of the corresponding material. The number of states of different materials appearing in different applications may be different, and the maximum number of states of any material appearing in any application is obtained as a first target number, and one application identifier corresponds to the first target number of bits in the state information. The process of adding the status field for each material description information comprises the following steps: and acquiring the product of the number of the plurality of application programs and the first target number, and adding a field with the number of bits equal to the product to each material description information as a state field of the material description information.
The plurality of application program identifiers are arranged in sequence, and the first target number of bits corresponding to each of the plurality of application program identifiers are also arranged in sequence.
For example, referring to fig. 3, the number of the application programs for delivering the advertisement is 5, the application program identifiers corresponding to the 5 application programs are identifier 1, identifier 2, identifier 3, identifier 4, and identifier 5, respectively, and the maximum number of states that any material appears in any application program is 3, then a field with 15 bits is added to each material description information, and the field with 15 bits is used as a state field of the corresponding material description information. For any material A, according to the sequence from left to right, the 1 st to 3 rd bits correspond to the identifier 1, the 4 th to 6 th bits correspond to the identifier 2, the 7 th to 9 th bits correspond to the identifier 3, the 10 th to 12 th bits correspond to the identifier 4, and the 13 th to 15 th bits correspond to the identifier 5.
In another possible implementation manner, after obtaining the maximum number of states of any material appearing in any application program, the first target number is determined according to the maximum number, which is shown in the following formula:
Figure BDA0003101813850000081
wherein n is the first target number, log 2 And m is a numerical value obtained by rounding up, wherein m is the maximum number of states of any material in any application program, and n and m are positive integers.
For example, m is 5, according to the formula
Figure BDA0003101813850000082
It can be obtained that n is 3, that is, in the case that the maximum number of states of any material appearing in any application is 5, each application corresponds to 3 bits in the state information of the material.
203. And adding state information in the state field of each material description information to obtain a plurality of material description information added with the state information.
The state information is added based on the state fields, the states of the materials in the plurality of application programs can be described, therefore, after the state fields are added to the description information of each material, the sub-state information corresponding to each material and each application program is determined according to the state of each material in each application program, the plurality of sub-state information corresponding to each material are added to the state fields of the corresponding material description information, and the state description information after the state information is added is obtained. For the plurality of material description information, a plurality of material description information to which the state information is added can be obtained.
For example, referring to fig. 4, the number of applications that place advertisements is 5, and the 5 applications are application 1, application 2, application 3, application 4, and application 5, respectively. The sub-state information corresponding to the state of the material a in the application 1 is 011, the sub-state information corresponding to the state of the material a in the application 2 is 010, the sub-state information corresponding to the state of the material a in the application 3 is 000, the sub-state information corresponding to the state of the material a in the application 4 is 001, and the sub-state information corresponding to the state of the material a in the application 5 is 010. In summary, the state information added to the state field of the material description information of the material a is: 011010000001010.
204. the plurality of materials and the state information of each material are stored in the same database.
Referring to fig. 4, for any material, the state information of the material includes sub-state information corresponding to a plurality of application identifications, each application identification having an indicated application, each sub-state information being used to represent the state of the material in the application indicated by the corresponding application identification, each application being used to project multimedia data produced by the material.
Through the above step 201 and 203, a plurality of materials and the state information of each material are obtained. In the related art, each application program has a corresponding database, and materials for making the multimedia data put in the application program are stored in the corresponding database. In the embodiment of the present application, since the state information of each material includes sub-state information corresponding to the material and the identifiers of the plurality of applications, the plurality of materials and the state information of each material can be stored in the same database, and the state management of the plurality of materials in the plurality of applications is realized based on the same database.
205. And responding to the received state change notification of any material, and acquiring the target application program identifier and the target sub-state information carried in the state change notification.
The state of any material in any application may change, either due to a change in the technician's manual operations, due to a modification of the application, over time, or due to other factors. When the state of any material in any application program changes, the target application program identifier and the target sub-state information carried in the state change notification are acquired in response to the received state change notification aiming at the material.
The target application program identifier is used for indicating the target application program, and the target sub-state information is used for representing the changed state of the material in the target application program, that is, the state of the material in the target application program is changed into the state represented by the target sub-state information.
206. And acquiring sub-state information corresponding to the target application program identifier in the state information of the material.
Since the state of the material in the target application is changed, the sub-state information of the material corresponding to the target application identifier needs to be modified correspondingly. For this purpose, the electronic device acquires sub-state information corresponding to the target application program identifier in the state information of the material.
In a possible implementation manner, the state information of the material includes a plurality of information storage regions arranged in a left-to-right order, each information storage region corresponds to one application identifier and includes a plurality of bits for storing sub-state information of the material corresponding to the application identifier. The process of obtaining the sub-state information corresponding to the target application program identifier in the state information of the material comprises the following steps: the method comprises the steps of obtaining an identification serial number of a target application program identification, carrying out rightward shift processing on state information of a material to obtain state information after shift processing, then obtaining the number of bits included in each information storage area, generating mask information with the number of 1 according to the number of the bits, carrying out bitwise AND processing on the mask information and the state information after shift processing, and obtaining sub-state information corresponding to the target application program identification in the state information of the material.
And the bit number of the right movement is determined according to the identification serial number and the bit number included in each information storage area.
For example, referring to fig. 5, the state information of the material X is 010001010000101, and includes 5 information storage areas arranged in order from left to right, namely, an area a, an area B, an area C, an area D, and an area E, each of the information storage areas including 3 bits, and the state information of the material X includes 15 bits. The material X is applied to the production of multimedia data of 5 application programs, and the application program identifiers corresponding to the 5 application programs are identifier 1, identifier 2, identifier 3, identifier 4, and identifier 5, respectively. The area A corresponds to the identifier 1 and is used for storing the sub-state information of the material X corresponding to the identifier 1; the area B corresponds to the identifier 2 and is used for storing the sub-state information of the material X corresponding to the identifier 2; the area C corresponds to the identifier 3 and is used for storing the sub-state information of the material X corresponding to the identifier 3; the area D corresponds to the identifier 4 and is used for storing the sub-state information of the material X corresponding to the identifier 4; the area E corresponds to the identifier 5, and is used to store the sub-state information of the material X corresponding to the identifier 5. The process of obtaining the sub-state information corresponding to the identifier 4 in the state information of the material X includes: moving the state information of the material X to the right by (4-1) × 3 bits to obtain 010001, then obtaining corresponding mask information 111 according to the number 3 of bits included in each region, and performing bitwise and processing on the mask information 111 and 010001 to obtain 001, where the sub-state information 001 is the sub-state information corresponding to the identifier 4.
In one possible implementation manner, after acquiring the sub-state information corresponding to the target application program identifier in the state information of the material, the information storage area corresponding to the target application program identifier is acquired from a plurality of information storage areas included in the state information of the material to serve as the target storage area, then the sub-state information stored in the target storage area is acquired and serves as the sub-state information corresponding to the target application program identifier in the state information of the material, and the sub-state information is used for representing the state of the material before the change occurs in the target application program.
207. And updating the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information.
After acquiring the corresponding sub-state information of the material after the state in the target application program is changed, the sub-state information before the change needs to be replaced by the changed sub-state information, so as to update the state information. Therefore, the electronic device updates the sub-state information corresponding to the target application program identifier in the state information of the material based on the acquired target sub-state information.
In one possible implementation manner, the state information of the material includes a plurality of information storage areas, the information storage area corresponding to the target application program identifier is the target storage area, each information storage area includes a plurality of bits, each bit has a value, and the combination of the values on the plurality of bits belonging to the same information storage area constitutes the sub-state information of the corresponding application program. The process of updating the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information comprises the following steps:
(1) acquiring sub-state information on an information storage area located before a target storage area from the plurality of information storage areas as first sub-state information.
In one possible implementation, the process of acquiring sub-status information on an information storage area located before a target storage area from a plurality of information storage areas as first sub-status information comprises: and acquiring the sum of the bit number of the target storage area and the bit number behind the target storage area in the state information of the material as a second target number, and performing right shift processing on the state information of the material based on the second target number to obtain first sub-state information.
(2) Acquiring sub-status information on an information storage area located after the target storage area from the plurality of information storage areas as second sub-status information.
In one possible implementation, the process of acquiring sub-status information on an information storage area located after a target storage area from among a plurality of information storage areas as second sub-status information includes: and acquiring low-order mask information corresponding to the sub-state information stored in the target storage area, and performing bitwise AND processing on the low-order mask information and the state information of the material to obtain second sub-state information.
And the low-order mask information corresponding to the sub-state information stored in the target storage area is used for reserving the sub-state information positioned behind the target storage area in the state information of the material.
In one possible implementation, the process of obtaining low-order mask information corresponding to sub-state information stored in the target storage area includes: shifting the binary value 1 to the left by (n-1) x m bits to obtain a binary code, and then obtaining a difference value between the binary code and the binary value 1, wherein the difference value is low-bit mask information. Wherein n is the area serial number of the target storage area, and m is the number of bits included in each information storage area.
(3) And combining the first sub-state information, the target sub-state information and the second sub-state information in sequence to obtain the updated state information of the material.
The first sub-state information is the sub-state information of the material located before the target storage area, the second sub-state information is the sub-state information of the material located after the target storage area, and since the sub-state information stored in the target storage area is changed, only the sub-state information stored in the target storage area is updated. That is, the acquired first sub-state information, the changed target sub-state information and the second sub-state information are combined in sequence to obtain updated state information.
For example, referring to fig. 6, the state information of the material a is 010001010000101, and includes 5 information storage areas, area 1, area 2, area 3, area 4, and area 5, where area 3 is a target storage area, target sub-state information is 001, each information storage area includes 3 bits, and the state information of the material a includes 15 bits. The process of acquiring the first sub-state information comprises the following steps: the sum 9 of the numbers of bits of the region 3, the region 4, and the region 5 is obtained, and the state information 010001010000101 is shifted to the right by 9 bits to obtain sub-state information 010001, where the sub-state information 010001 is the first sub-state information. The process of acquiring the second sub-state information is as follows: acquiring low-order mask information 111111 corresponding to the sub-state information stored in the target storage area, and performing bitwise and processing on the low-order mask information 111111 and the state information 010001010000101 to obtain sub-state information 000101, where the sub-state information 000101 is second sub-state information. The first sub-state information 010001, the target sub-state information 001, and the second sub-state information 000101 are merged to obtain the updated state information 010001001000101 of the material a.
In one possible implementation manner, the process of combining the first sub-state information, the target sub-state information, and the second sub-state information in order to obtain the updated state information of the material includes: and performing leftward shift processing on the first sub-state information based on the second target number to enable the value of the second target number of bits behind the first sub-state information to be 0 to obtain third sub-state information, then acquiring the number of bits behind a target storage region in the state information to serve as a third target number, performing leftward shift processing on the target sub-state information based on the third target number to enable the value of the third target number of bits behind the target sub-state information to be 0 to obtain fourth sub-state information, and performing bitwise OR processing on the third sub-state information, the fourth sub-state information and the second sub-state information to obtain state information after the material is updated.
For example, referring to fig. 7, the state information of the material a is 010001010000101, and includes 5 information storage areas, area 1, area 2, area 3, area 4, and area 5, where area 3 is a target storage area, target sub-state information is 001, each information storage area includes 3 bits, and the state information of the material a includes 15 bits. The object sub-state information is 001, and the first sub-state information 010001, the second sub-state information 000101, the second object number 9, and the third object number 6 are acquired. The first sub-state information 010001 is shifted to the left by 9 bits to obtain third sub-state information 010001000000000, the target sub-state information 001 is shifted to the left by 6 bits to obtain fourth sub-state information 001000000, and the third sub-state information 010001000000000, the fourth sub-state information 001000000, and the second sub-state information 000101 are bitwise or processed to obtain state information 010001001000101 after the material is updated.
According to the material management method provided by the embodiment of the application, the states of the same material in different application programs are managed by storing the state information of the plurality of materials and each material in the same database, the waste of data redundancy and storage space caused by the fact that the same material is repeatedly stored in different databases is avoided, and under the condition that the state of any material in any application program is changed, the state information of the material can be adaptively updated, so that the material management efficiency is improved, the storage space is saved, and the operation performance of equipment is improved.
In addition, based on the mode of managing a plurality of materials by the same database, even if a new application program is developed subsequently, the multimedia data put into the new application program can be manufactured based on the materials stored in the database without re-creating the database, so that the manufacturing efficiency of the multimedia data and the putting efficiency of the subsequent multimedia data are improved, and the flexibility is strong.
Moreover, the state information of each material in the application programs can be managed by adding the state field to each material and adding the state information in the state field, the state information of each material comprises a plurality of parts which respectively correspond to the plurality of application programs, the states of the material in the plurality of application programs do not need to be respectively stored, the effect of comprehensively managing the states of the material in the plurality of application programs can be realized based on one piece of material description information, and the material management efficiency is improved.
In addition, the state information of the material comprises the sub-state information corresponding to the plurality of application programs, and the state information of the material is divided into the plurality of information storage areas, so that the state information and the plurality of sub-state information comprising the state information can be managed by taking the information storage areas as units, and the material management efficiency is further improved.
And the information storage area comprises a plurality of bits, the state information and the sub-state information are managed by taking the bits as units, the extraction and the update of the state information are realized by processing numerical values on the bits, the state update is carried out by taking the bits as units, and the flexibility of material management is further improved.
Fig. 8 is a block diagram of a material management apparatus according to an embodiment of the present application. Referring to fig. 8, the apparatus includes: a storage module 801, a status information acquisition module 802, and an update module 803.
A storage module 801, configured to store a plurality of materials and state information of each material in the same database, where the state information includes sub-state information corresponding to a plurality of application program identifiers, each sub-state information is used to represent a state of the material in an application program indicated by the corresponding application program identifier, and each application program is used to deliver multimedia data made from the material;
a state information obtaining module 802, configured to, in response to receiving a state change notification for any material, obtain a target application identifier and target sub-state information carried in the state change notification, where the target application identifier is used to indicate a target application, and the target sub-state information is used to indicate a state of the material after being changed in the target application;
and the updating module 803 is configured to update the sub-state information corresponding to the target application identifier in the state information of the material based on the target sub-state information.
In one possible implementation, referring to fig. 9, the apparatus further comprises:
a description information obtaining module 804, configured to obtain a plurality of materials and material description information of each material, where the material description information includes at least one content field, and each content field is used to describe content of a corresponding material;
a field adding module 805, configured to add a status field for each piece of material description information;
an information adding module 806, configured to add status information to the status field of each piece of material description information, to obtain a plurality of pieces of material description information to which the status information is added.
In another possible implementation, referring to fig. 9, an application id corresponds to a first target number of bits in the state information, where the first target number is used to represent the maximum number of states that any material appears in any application; a field addition module 805, comprising:
a product acquisition unit 8051 configured to acquire a product of the number of the plurality of application programs and the first target number;
a field adding unit 8052, configured to add, for each material description information, a field with a bit number equal to the product as a state field of the material description information.
In another possible implementation manner, referring to fig. 9, the state information includes a plurality of information storage regions arranged in a left-to-right order, where each information storage region corresponds to one application identifier and is used to store material sub-state information corresponding to the application identifier;
the device still includes:
an area acquisition module 807 for acquiring an information storage area corresponding to the target application program identifier from a plurality of information storage areas included in the status information of the material as a target storage area;
a sub-status information obtaining module 808, configured to obtain the sub-status information stored in the target storage area, as the sub-status information corresponding to the target application identifier in the status information of the material.
In another possible implementation, referring to fig. 9, the update module 803 includes:
a first acquisition unit 8031 configured to acquire, from among the plurality of information storage areas, sub-state information on an information storage area located before the target storage area as first sub-state information;
a second acquiring unit 8032 configured to acquire, from among the plurality of information storage areas, sub-state information on an information storage area located behind the target storage area as second sub-state information;
the merging unit 8033 is configured to merge the first sub-state information, the target sub-state information, and the second sub-state information in order to obtain the updated state information of the material.
In another possible implementation manner, referring to fig. 9, each information storage area includes a plurality of bits, each bit has a value, and the values on the plurality of bits belonging to the same information storage area are combined to form sub-state information of a corresponding application;
the first obtaining unit 8031 is further configured to obtain, as the second target number, a sum of the number of bits in the target storage area in the state information and the number of bits after the target storage area; and performing right shift processing on the state information of the material based on the second target quantity to obtain first sub-state information.
In another possible implementation manner, referring to fig. 9, the second obtaining unit 8032 is further configured to obtain low-order mask information corresponding to the sub-state information stored in the target storage area, where the low-order mask information is used to reserve the sub-state information located after the target storage area in the state information of the material; and carrying out bitwise AND processing on the low-order mask information and the state information of the material to obtain second sub-state information.
In another possible implementation manner, referring to fig. 9, the merging unit 8033 is further configured to perform left shift processing on the first sub-state information based on the second target number, so that a value on a second target number of bits after the first sub-state information is 0, and obtain third sub-state information;
the merging unit 8033 is further configured to obtain, as a third target number, the number of bits after the target storage area in the state information;
the merging unit 8033 is further configured to perform leftward shift processing on the target sub-state information based on the third target number, so that a value of a bit of the third target number located after the target sub-state information is 0, and obtain fourth sub-state information;
the merging unit 8033 is further configured to perform bit-wise or processing on the third sub-state information, the fourth sub-state information, and the second sub-state information to obtain state information after the material is updated.
It should be noted that: the material management apparatus provided in the above embodiment is only illustrated by dividing the functional modules when managing the material, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the material management apparatus and the material management method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments in detail and are not described herein again.
In an exemplary embodiment, there is also provided an electronic device comprising one or more processors and one or more memories having stored therein at least one instruction that is loaded and executed by the one or more processors to implement the operations performed by the material management method of any of the possible implementations described above.
Optionally, the electronic device is provided as a terminal. Fig. 10 shows a block diagram of a terminal 1000 according to an exemplary embodiment of the present application. The terminal 1000 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1000 can also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or the like by other names.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
Processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 1001 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1002 is used to store at least one instruction for execution by the processor 1001 to implement the material management methods provided by the method embodiments of the present application.
In some embodiments, terminal 1000 can also optionally include: a peripheral interface 1003 and at least one peripheral. The processor 1001, memory 1002 and peripheral interface 1003 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, touch screen display 1005, camera 1006, audio circuitry 1007, positioning components 1008, and power supply 1009.
The peripheral interface 1003 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 1001 and the memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral interface 1003 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The Radio Frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuitry 1004 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1004 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to capture touch signals on or over the surface of the display screen 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this point, the display screen 1005 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display screen 1005 can be one, providing a front panel of terminal 1000; in other embodiments, display 1005 can be at least two, respectively disposed on different surfaces of terminal 1000 or in a folded design; in still other embodiments, display 1005 can be a flexible display disposed on a curved surface or on a folded surface of terminal 1000. Even more, the display screen 1005 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display screen 1005 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 1006 is used to capture images or video. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing or inputting the electric signals to the radio frequency circuit 1004 for realizing voice communication. For stereo sound collection or noise reduction purposes, multiple microphones can be provided, each at a different location of terminal 1000. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuit 1007 may also include a headphone jack.
A Location component 1008 is employed to locate a current geographic Location of terminal 1000 for purposes of navigation or LBS (Location Based Service). The Positioning component 1008 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 1009 is used to supply power to various components in terminal 1000. The power source 1009 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 1009 includes a rechargeable battery, the rechargeable battery may support wired charging or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1000 can also include one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyro sensor 1012, pressure sensor 1013, fingerprint sensor 1014, optical sensor 1015, and proximity sensor 1016.
Acceleration sensor 1011 can detect acceleration magnitudes on three coordinate axes of a coordinate system established with terminal 1000. For example, the acceleration sensor 1011 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1001 may control the touch display screen 1005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect a body direction and a rotation angle of the terminal 1000, and the gyro sensor 1012 and the acceleration sensor 1011 may cooperate to acquire a 3D motion of the user on the terminal 1000. From the data collected by the gyro sensor 1012, the processor 1001 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1013 may be disposed on a side frame of terminal 1000 and/or on a lower layer of touch display 1005. When pressure sensor 1013 is disposed on a side frame of terminal 1000, a user's grip signal on terminal 1000 can be detected, and processor 1001 performs left-right hand recognition or shortcut operation according to the grip signal collected by pressure sensor 1013. When the pressure sensor 1013 is disposed at a lower layer of the touch display screen 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1005. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the user according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, transferring resources, changing settings, and the like. Fingerprint sensor 1014 can be disposed on the front, back, or side of terminal 1000. When a physical key or vendor Logo is provided on terminal 1000, fingerprint sensor 1014 can be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the touch display screen 1005 according to the intensity of the ambient light collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1005 is turned down. In another embodiment, the processor 1001 may also dynamically adjust the shooting parameters of the camera assembly 1006 according to the intensity of the ambient light collected by the optical sensor 1015.
Proximity sensor 1016, also known as a distance sensor, is typically disposed on a front panel of terminal 1000. Proximity sensor 1016 is used to gather the distance between the user and the front face of terminal 1000. In one embodiment, when proximity sensor 1016 detects that the distance between the user and the front surface of terminal 1000 gradually decreases, processor 1001 controls touch display 1005 to switch from a bright screen state to a dark screen state; when proximity sensor 1016 detects that the distance between the user and the front of terminal 1000 is gradually increased, touch display screen 1005 is controlled by processor 1001 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in FIG. 10 is not intended to be limiting and that terminal 1000 can include more or fewer components than shown, or some components can be combined, or a different arrangement of components can be employed.
Optionally, the electronic device is provided as a server. Fig. 11 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 1100 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1101 and one or more memories 1102, where the memory 1102 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 1101 to implement the methods provided by the foregoing method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, is also provided that includes instructions executable by a processor in an electronic device to perform the material management method of the above embodiments. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program including at least one program code loaded and executed by a processor to implement the material management method as in the above-described embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (11)

1. A method for managing material, the method comprising:
the method comprises the steps of obtaining a plurality of materials and material description information of each material, wherein the material description information comprises at least one content field, and each content field is used for describing the content of the corresponding material;
acquiring a product of the number of the plurality of application programs and a first target number, wherein the first target number is used for representing the maximum number of states of any material appearing in any application program;
adding a field with the bit number equal to the product for each material description information as a state field of the material description information;
adding state information in a state field of each piece of material description information to obtain a plurality of pieces of material description information after the state information is added, wherein the state information comprises sub-state information corresponding to a plurality of application program identifiers, each sub-state information is used for representing the state of the material in an application program indicated by the corresponding application program identifier, each application program is used for delivering multimedia data made of the material, and one application program identifier corresponds to the first target number of bits in the state information;
storing the plurality of materials and the state information of each material in the same database;
in response to receiving a state change notification of any material, acquiring a target application program identifier and target sub-state information carried in the state change notification, wherein the target application program identifier is used for indicating a target application program, and the target sub-state information is used for representing the state of the material after the material is changed in the target application program;
and updating the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information.
2. The method according to claim 1, wherein the status information comprises a plurality of information storage areas arranged in a left-to-right order, each information storage area corresponds to an application identifier, and is used for storing sub-status information of the material corresponding to the application identifier;
before the updating of the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information, the method further includes:
acquiring an information storage area corresponding to the target application program identifier from the plurality of information storage areas included in the state information of the material as a target storage area;
acquiring the sub-state information stored in the target storage area as the sub-state information corresponding to the target application program identifier in the state information of the material.
3. The method of claim 2, wherein updating the sub-state information corresponding to the target application identifier in the state information of the material based on the target sub-state information comprises:
acquiring sub-state information on an information storage area located before the target storage area from the plurality of information storage areas as first sub-state information;
acquiring sub-state information on an information storage area located behind the target storage area from the plurality of information storage areas as second sub-state information;
and combining the first sub-state information, the target sub-state information and the second sub-state information in sequence to obtain the updated state information of the material.
4. The method of claim 3, wherein each of the information storage regions comprises the first target number of bits, each bit having a value, and the combination of the values in the first target number of bits belonging to the same information storage region form sub-state information of the corresponding application;
the acquiring, from the plurality of information storage areas, sub-status information on an information storage area located before the target storage area as first sub-status information includes:
acquiring the sum of the bit number of the target storage area and the bit number behind the target storage area in the state information as a second target number;
and performing right shift processing on the state information of the material based on the second target quantity to obtain the first sub-state information.
5. The method according to claim 4, wherein the acquiring, from the plurality of information storage areas, the sub-status information on the information storage area located after the target storage area as the second sub-status information comprises:
acquiring low-order mask information corresponding to the sub-state information stored in the target storage area, wherein the low-order mask information is used for reserving the sub-state information behind the target storage area in the state information of the material;
and carrying out bitwise AND processing on the low-order mask information and the state information of the material to obtain the second sub-state information.
6. The method according to claim 5, wherein the combining the first sub-status information, the target sub-status information, and the second sub-status information in order to obtain the updated status information of the material comprises:
performing left shift processing on the first sub-state information based on the second target number, so that the value of the second target number of bits after the first sub-state information is 0, and obtaining third sub-state information;
acquiring the number of bits behind the target storage area in the state information as a third target number;
performing leftward shift processing on the target sub-state information based on the third target number to enable a value of a bit number of the third target number behind the target sub-state information to be 0, so as to obtain fourth sub-state information;
and carrying out bitwise processing or treatment on the third sub-state information, the fourth sub-state information and the second sub-state information to obtain the updated state information of the material.
7. A material management apparatus, characterized in that the apparatus comprises:
the system comprises a description information acquisition module, a display module and a display module, wherein the description information acquisition module is used for acquiring a plurality of materials and material description information of each material, the material description information comprises at least one content field, and each content field is used for describing the content of the corresponding material;
the field adding module comprises a product acquiring unit and a field adding unit, wherein the product acquiring unit is used for acquiring the product of the number of the plurality of application programs and a first target number, and the first target number is used for representing the maximum number of states of any material appearing in any application program;
the field adding unit is used for adding a field with the number of bits equal to the product for each material description information as a state field of the material description information;
an information adding module, configured to add state information to a state field of each piece of material description information to obtain a plurality of pieces of material description information to which the state information is added, where the state information includes sub-state information corresponding to a plurality of application program identifiers, each sub-state information is used to represent a state of the material in an application program indicated by a corresponding application program identifier, each application program is used to launch multimedia data made of the material, and one application program identifier corresponds to the first target number of bits in the state information;
the storage module is used for storing the plurality of materials and the state information of each material in the same database;
the state information acquisition module is used for responding to a received state change notification of any material, and acquiring a target application program identifier and target sub-state information carried in the state change notification, wherein the target application program identifier is used for indicating a target application program, and the target sub-state information is used for representing the state of the material after being changed in the target application program;
and the updating module is used for updating the sub-state information corresponding to the target application program identifier in the state information of the material based on the target sub-state information.
8. The apparatus according to claim 7, wherein the status information comprises a plurality of information storage areas arranged in a left-to-right order, each information storage area corresponding to an application identifier for storing sub-status information of the material corresponding to the application identifier;
the device further comprises:
the area acquisition module is used for acquiring an information storage area corresponding to the target application program identifier from the plurality of information storage areas included in the state information of the material as a target storage area;
and the sub-state information acquisition module is used for acquiring the sub-state information stored in the target storage area as the sub-state information corresponding to the target application program identifier in the state information of the material.
9. The apparatus of claim 8, wherein the update module comprises:
a first acquisition unit configured to acquire, from among the plurality of information storage areas, sub-status information on an information storage area located before the target storage area as first sub-status information;
a second acquisition unit configured to acquire, from among the plurality of information storage areas, sub-status information on an information storage area located after the target storage area as second sub-status information;
and the merging unit is used for merging the first sub-state information, the target sub-state information and the second sub-state information in sequence to obtain the updated state information of the material.
10. An electronic device, comprising one or more processors and one or more memories having stored therein at least one instruction that is loaded and executed by the one or more processors to perform operations performed by the material management method as recited in any one of claims 1-6.
11. A computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to perform operations performed by the material management method according to any one of claims 1 to 6.
CN202110624890.3A 2021-06-04 2021-06-04 Material management method, device, electronic equipment and storage medium Active CN113407741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110624890.3A CN113407741B (en) 2021-06-04 2021-06-04 Material management method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110624890.3A CN113407741B (en) 2021-06-04 2021-06-04 Material management method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113407741A CN113407741A (en) 2021-09-17
CN113407741B true CN113407741B (en) 2022-09-20

Family

ID=77676376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110624890.3A Active CN113407741B (en) 2021-06-04 2021-06-04 Material management method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113407741B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105656664A (en) * 2015-12-23 2016-06-08 小米科技有限责任公司 Information display method and device
US10698883B2 (en) * 2017-10-25 2020-06-30 International Business Machines Corporation Data coherency between trusted DBMS and untrusted DBMS
CN109656987A (en) * 2018-10-12 2019-04-19 深圳壹账通智能科技有限公司 Data integration method, device, equipment and storage medium
CN109815240B (en) * 2019-01-29 2022-02-25 北京百度网讯科技有限公司 Method, apparatus, device and storage medium for managing index
CN111260396B (en) * 2020-01-13 2024-02-27 腾讯科技(深圳)有限公司 Advertisement preloading method and device, electronic equipment and storage medium
CN111338672B (en) * 2020-02-19 2024-01-26 上海掌门科技有限公司 Method for optimizing update of application program, electronic device and computer storage medium
CN111897487B (en) * 2020-06-15 2023-08-18 北京瀚诺半导体科技有限公司 Method, device, electronic equipment and medium for managing data
CN111970528B (en) * 2020-08-20 2022-04-26 广州方硅信息技术有限公司 Live broadcast recommendation method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN113407741A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN110278464B (en) Method and device for displaying list
CN108093307B (en) Method and system for acquiring playing file
CN110147503B (en) Information issuing method and device, computer equipment and storage medium
CN111949680A (en) Data processing method and device, computer equipment and storage medium
CN110890969B (en) Method and device for mass-sending message, electronic equipment and storage medium
CN111192072A (en) User grouping method and device and storage medium
CN110677713A (en) Video image processing method and device and storage medium
CN112560435B (en) Text corpus processing method, device, equipment and storage medium
CN111246231B (en) Live broadcast management method and device, server and computer readable storage medium
CN111064657B (en) Method, device and system for grouping concerned accounts
CN110971840B (en) Video mapping method and device, computer equipment and storage medium
CN112559795A (en) Song playing method, song recommending method, device and system
CN113535039B (en) Method and device for updating page, electronic equipment and computer readable storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN111641853B (en) Multimedia resource loading method and device, computer equipment and storage medium
CN113407741B (en) Material management method, device, electronic equipment and storage medium
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN112364244A (en) Multimedia data recommendation method, device, server and storage medium
CN111369434A (en) Method, device and equipment for generating cover of spliced video and storage medium
CN111125095A (en) Data prefix adding method and device, electronic equipment and medium
CN114071119B (en) Resource testing method and device, electronic equipment and storage medium
CN112579661B (en) Method and device for determining specific target pair, computer equipment and storage medium
CN113052408B (en) Method and device for community aggregation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant