Search

CN-117216181-B - Text resource management method, equipment and storage medium

CN117216181BCN 117216181 BCN117216181 BCN 117216181BCN-117216181-B

Abstract

The application discloses a text resource management method, equipment and a storage medium, wherein the text resource management method comprises the steps of obtaining a text resource to be stored, wherein the text resource to be stored carries an index mark; if the index identifier corresponding to the text resource to be stored exists in the text resource set, the main library resource corresponding to the existing index identifier is obtained, and the text resource to be stored is used as the auxiliary library resource to be associated with the main library resource. The hierarchical storage mode of using the master library resource and the slave library resource ensures the differential use of a plurality of resource using ends on the premise of realizing that one text resource is used for the reference of a plurality of resource using ends and reducing the text development workload, avoids the influence of changing the text resource on other resource using ends and improves the efficiency and the stability of multi-language use.

Inventors

  • LU XUAN
  • LIU RUIZHE
  • LI DACHENG

Assignees

  • 杭州华橙软件技术有限公司

Dates

Publication Date
20260512
Application Date
20230814

Claims (8)

  1. 1. The text resource management method is characterized by being applied to a resource management end, wherein the resource management end provides text resources for at least two resource use ends, the text resources are used for rendering and displaying text contents in a display interface, and the text resources are multilingual text resources, and the method comprises the following steps: Acquiring a text resource to be stored, wherein the text resource to be stored carries an index mark; inquiring whether index identifiers corresponding to the text resources to be stored exist in a text resource set or not, wherein the text resource set is used for storing text resources and the index identifiers corresponding to the text resources, the stored text resource types contain a master library resource and a slave library resource, the text resource with the largest data quantity in a plurality of text resources corresponding to the same index identifier is used as the master library resource, other text resources are used as the slave library resources, and the slave library resources only reserve data contents different from the master library resource; If the index identifier corresponding to the text resource to be stored exists in the text resource set, acquiring a main library resource corresponding to the existing index identifier, and storing the text resource to be stored as a slave library resource in association with the main library resource; Receiving a resource acquisition request sent by a resource using end, wherein the resource acquisition request carries an index identifier; selecting a master library resource and a slave library resource which are associated with the index identifier corresponding to the resource acquisition request from the text resource set, and obtaining candidate text resources; Selecting a target text resource from a plurality of candidate text resources according to preset conditions; If the resource type of the target text resource is a slave library resource, fusing the target text resource and a corresponding master library resource, and returning the fused text resource to the resource using end so that the resource using end renders and displays the fused text resource.
  2. 2. The method of claim 1, wherein the resource obtaining request further carries resource description information, and wherein selecting the target text resource from the candidate text resources according to the preset condition comprises: And screening the plurality of candidate text resources based on the resource description information to obtain target text resources.
  3. 3. The method of claim 2, wherein the resource description information is a slave library resource description information, wherein the filtering the plurality of candidate text resources based on the resource description information to obtain a target text resource comprises: Detecting whether a slave library resource matched with the slave library resource description information exists in the plurality of candidate text resources; If the matched slave library resources exist, the matched slave library resources are used as target text resources; And if the slave library resources matched with the slave library resource description information do not exist, taking the master library resource in the plurality of candidate text resources as a target text resource.
  4. 4. The method of claim 1, wherein the text resources correspond to an associated identifier list, the associated identifier list is used for storing identifier information of associated resource users corresponding to the text resources, and the selecting the target text resources from the candidate text resources according to the preset condition comprises: Acquiring identification information corresponding to the resource using end, and acquiring an associated identification list corresponding to each candidate text resource; Detecting whether identification information corresponding to the resource using end exists in each associated identification list; and taking the candidate text resource corresponding to the associated identification list with the identification information corresponding to the resource using end as a target text resource.
  5. 5. The method according to claim 4, wherein the step of using the candidate text resource corresponding to the associated identifier list having the identifier information corresponding to the resource using end as the target text resource includes: And if the identification information corresponding to the resource using end does not exist in each associated identification list, taking the main library resource in the candidate text resources as a target text resource.
  6. 6. The method according to claim 1, wherein the method further comprises: And if the index identifier corresponding to the text resource to be stored does not exist in the text resource set, the text resource to be stored is used as a main library resource to be associated with the index identifier for storage.
  7. 7. An electronic device comprising a memory and a processor for executing program instructions stored in the memory to implement the steps of the method according to any of claims 1-6.
  8. 8. A computer readable storage medium storing program instructions executable by a processor to perform the steps of the method according to any one of claims 1-6.

Description

Text resource management method, equipment and storage medium Technical Field The present application relates to the field of data transmission technologies, and in particular, to a text resource management method, a device, and a storage medium. Background At present, the software application or the webpage generally performs rendering display of text content by referring to corresponding text resources, and as the demand of people for personalized services increases, the management of the text resources is more complex. For example, when a software application or web page is oriented to users in multiple languages, the same application program needs to develop multiple different languages for users in different languages. When the software application or the webpage is developed, multi-language adaptation is required for text information to be displayed to users, so that the users in all countries can use familiar native languages when using the software application or the webpage. However, this requires development of different languages for each software application or web page, resulting in a large development effort and difficult management of text resources. Disclosure of Invention The application provides at least a text resource management method, equipment and a storage medium. The first aspect of the application provides a text resource management method which is applied to a resource management end, the resource management end provides text resources for at least two resource use ends, the text resources are used for rendering and displaying text contents in a display interface, the method comprises the steps of obtaining the text resources to be stored, the text resources to be stored carry index identifiers, inquiring whether index identifiers corresponding to the text resources to be stored exist in a text resource set, the text resource set is used for storing the text resources and the index identifiers corresponding to the text resources, the stored text resource type contains master library resources and slave library resources, if the index identifiers corresponding to the text resources to be stored exist in the text resource set, obtaining the master library resources corresponding to the existing index identifiers, and taking the text resources to be stored as the slave library resources to be associated with the master library resources for storage, receiving a resource obtaining request sent by the resource use end, and selecting the master library resources or returning the slave library resources to the resource use end according to preset conditions so that the resource use end displays the master library resources or the slave library resources. In one embodiment, the resource acquisition request carries an index identifier, the resource acquisition request sent by the resource using end is received, a main library resource is selected from a text resource set according to a preset condition or a sub library resource is returned to the resource using end, so that the resource using end renders and displays the main library resource or the sub library resource. In one embodiment, the resource obtaining request further carries resource description information, and the selecting the target text resource from the candidate text resources according to the preset condition comprises the steps of screening a plurality of candidate text resources based on the resource description information to obtain the target text resource. In one embodiment, the resource description information is slave library resource description information, and the method comprises the steps of screening a plurality of candidate text resources based on the resource description information to obtain target text resources, wherein the method comprises the steps of detecting whether slave library resources matched with the slave library resource description information exist in the plurality of candidate text resources, taking the matched slave library resources as target text resources if the slave library resources matched with the slave library resource description information exist, and taking master library resources in the plurality of candidate text resources as target text resources if the slave library resources matched with the slave library resource description information do not exist. In one embodiment, the text resource corresponds to an associated identification list, the associated identification list is used for storing identification information of an associated resource using end corresponding to the text resource, the target text resource is selected from the candidate text resources according to preset conditions, the method comprises the steps of obtaining the identification information corresponding to the resource using end, obtaining the associated identification list corresponding to each candidate text resource, detecting whether the identification information corresponding to the resourc