A processing method and device for updating a shared resource
Patent Information
- Application Number
- CN202410468289.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-04-18
AI Technical Summary
通过调研我们发现目前大多数公司使用的公告板或共享资源池系统都存在一些问题,诸如:1)未对共享资源的文件格式进行统一化管理,这会导致共享资源的文件格式过于多样化,每个用户若要能对所有资源进行浏览就需要在本地安装多种文件格式的解析器,诸如PDFreader、用于浏览Word/Exce l/PPT等电子文件的off i ce插件、Java/Python脚本解析器等,这类问题会对用户浏览共享资源带来诸多不便、尤其对使用手机客户端的用户;2)对共享资源的可访问权限配置通过人工方式实现且不能对同一资源的不同版本进行访问权限区分,这类问题在共享资源的数量翻倍时会导致资源配置工作量翻倍、在共享资源的更新次数增多时会导致资源共享范围被放大;3)只通过设置文件名的方式来体现版本差异、未建立可用于版本溯源的专用数据库,这类问题在共享资源数量猛增的情况下无法对每个共享资源的历史更新轨迹进行快速溯源
[0051]本发明实施例提供了一种更新共享资源的处理方法、装置、电子设备及计算机可读存储介质。由上述内容可知,本发明实施例预先配置了一个用于存储共享资源信息的第一共享资源库、一个用于接收Markdown格式文件的第一接收接口、一个基于Markdown-HTML转档工具对Markdown格式文件进行HTML格式文件转档的第一转档接口以及一个用于接收共享资源库信息查询指令的第一查询接口和一套用于规范Markdown格式文件撰写格式的第一格式规范;并对第一接收接口接收的Markdown格式文件提供了文件格式检查、文件数据解析、HTML格式文件转档、资源库更新和人员通知群发功能;并对第一查询接口收到的第一查询指令提供了共享资源的查询/溯源功能。本发明实施例,一方面通过将所有共享资源的浏览文件格式统一成HTML格式的处理机制,降低了用户操作难度、提高了用户浏览便捷度;另一方面通过第一格式规范提供的以单个资源版本为基础配资单位的访问权限配置机制,降低了资源配置工作量、提高了资源访问权限和资源共享范围的配置灵活度;再一方面通过能对所有用户发布的所有共享资源的所有历史版本信息进行存储的第一共享资源库,提高了共享资源的查询/溯源效率。
Smart Images

Figure CN118260302B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and apparatus for updating shared resources. Background Technology
[0002] Currently, many companies share resources such as meeting minutes, work notes, training materials, project documents, technical documents, and technical literature in specific fields through bulletin boards or shared resource pools. Our research revealed several issues with most company bulletin board or shared resource pool systems, including: 1) a lack of standardized management of shared resource file formats. This leads to an overly diverse range of file formats, requiring users to install multiple file format parsers locally, such as PDFreader, Office plugins for viewing Word / Excel / PPT documents, and Java / Python script parsers, to browse all resources. This inconveniences users, especially those using mobile clients; 2) manual configuration of access permissions for shared resources, failing to differentiate between different versions of the same resource. This doubles the workload of resource configuration when the number of shared resources doubles, and expands the scope of resource sharing when the frequency of updates increases; 3) version differences are only reflected by filename settings, without a dedicated database for version tracing. This makes it difficult to quickly trace the historical update history of each shared resource when the number of resources surges. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of existing technologies by providing a method, apparatus, electronic device, and computer-readable storage medium for updating shared resources. This invention pre-configures a first shared resource repository for storing shared resource information, a first receiving interface for receiving Markdown format files, a first conversion interface for converting Markdown format files to HTML format files using a Markdown-HTML conversion tool, a first query interface for receiving shared resource repository information query commands, and a set of first format specifications for standardizing the writing format of Markdown format files. It also performs file format checks, file data parsing, HTML format file conversion, resource repository updates, and mass notifications to personnel on the Markdown format files received by the first receiving interface; and provides feedback on shared resource queries based on the first query commands received by the first query interface. This invention achieves several goals: First, it unifies the browsing file format of all shared resources into HTML format, which is supported by all client browsers (including mobile clients), thereby reducing the difficulty of user operation and improving the convenience of user browsing. Second, it allows for the configuration of corresponding users for each version of each shared resource through the Markdown format file writing specifications, i.e., the first format specification, thereby reducing the workload of resource configuration and improving the flexibility of resource access permissions and resource sharing scope configuration. Third, it enables the management of all historical version information of all shared resources published by all users through the first shared resource library, thereby improving the efficiency of resource query / tracing.
[0004] To achieve the above objectives, a first aspect of the present invention provides a method for updating shared resources, the method comprising:
[0005] A database for storing shared resource information is pre-configured, denoted as the corresponding first shared resource repository; a file receiving service interface for receiving Markdown format files is configured, denoted as the corresponding first receiving interface; a file conversion service interface for converting Markdown format files to HTML format files based on a pre-defined Markdown-HTML conversion tool is configured, denoted as the corresponding first conversion interface; a resource repository query service interface for receiving shared resource repository information query commands is configured, denoted as the corresponding first query interface; and a Markdown text format specification for standardizing the writing format of Markdown format files is configured, denoted as the corresponding first format specification.
[0006] The first receiving interface and the first query interface are started and put into a continuous message listening state;
[0007] Each time the first receiving interface receives a data packet, it extracts the corresponding Markdown format file from the current data packet as the corresponding first original file; and performs text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result; and when the first compliance status of the first parsing result is compliant, it stores the first original file to obtain the corresponding first original file address; and calls the first conversion interface to perform HTML format file conversion processing on the first original file based on the Markdown-HTML conversion tool to obtain the corresponding first converted file; and stores the first converted file to obtain the corresponding first converted file address; and updates the first shared resource library according to the first parsing dataset, the first original file address, and the first converted file address to obtain the corresponding current update record; and performs mass notification processing based on the current update record; the first parsing result includes the first compliance status and the first parsing dataset; the first compliance status includes compliant and non-compliant.
[0008] Each time the first query interface receives a data packet, it extracts the corresponding first query instruction from the current data packet; and performs shared resource query / tracing processing on the first shared resource library according to the first query instruction.
[0009] Preferably, the first shared resource library includes a first shared resource list and multiple first resource version lists;
[0010] The first shared resource list includes multiple first resource records; each first resource record corresponds one-to-one with the first resource version list; each first resource record includes a first resource identifier field, a first resource name field, a first resource type field, a first initial version field, a first latest version field, and a first list identifier field; the first resource type field includes multiple types of shared resources, which at least include meeting minutes, work notes, training materials, project documents, technical documents, and domain literature; the first list identifier field is the data table identifier of the corresponding first resource version list.
[0011] The first resource version list includes multiple first version records; the first version record includes a first version field, a first updater identifier field, a first update time field, a first update type field, a first update description field, a first shared personnel list field, a first original file address field, and a first converted file address field; the first update type field includes new, add, and modify; the first shared personnel list field includes one or more first shared personnel notification interfaces, one of which is a personnel notification interface corresponding to the first updater identifier field;
[0012] The first receiving interface, the first conversion interface, and the first query interface are all URL interfaces; the data message protocols of the first receiving interface, the first conversion interface, and the first query interface include at least HTTP / HTTPS message protocols and FTP message protocols;
[0013] The first format specification requires that Markdown format files be divided into a header comment section and a body code section;
[0014] The header comment section is located at the beginning of the Markdown file; the header comment section consists of seven header comment lines, with a newline character between every two adjacent header comment lines but no blank lines; the text format of each header comment line is as follows: beginning comment character + keyword type text + separator + keyword content text; the beginning comment character is a Markdown syntax comment character; the separator is a colon or equals sign character; the keyword type text includes seven types, namely updater identifier keyword, resource name keyword, resource type keyword, update time keyword, update type keyword, and update description keyword. The text includes keywords for the shared personnel list; the keyword content text includes seven types of content text, namely updater identifier text, resource name text, resource type text, update time text, update type text, update description text, and shared personnel list text; the specific content text of the keyword content text corresponds one-to-one with the specific type of the keyword type text; the update type text includes new, add, and modify; the shared personnel list text includes one or more personnel notification interfaces, one of which is the personnel notification interface corresponding to the updater identifier text, and each pair of personnel notification interfaces is separated by a comma or a pause character as the corresponding personnel separator;
[0015] The body code segment is located below the header comment segment up to the last line of the Markdown file; the body code segment consists of multiple lines of Markdown code; there is at least one blank line character between the first line of the body code segment and the last line of the header comment segment.
[0016] The first parsed dataset includes a first updater identifier, a first resource name, a first resource type, a first update time, a first update type, a first update description, and a first shared personnel list; the first shared personnel list includes one or more second shared personnel notification interfaces, wherein one of the second shared personnel notification interfaces is a personnel notification interface corresponding to the first updater identifier;
[0017] The address format of the first original file address and the address of the first converted file is URL format;
[0018] The first query instruction includes the first query personnel notification interface, the first query / tracing type, the first query resource identifier, and the first query resource version; the first query / tracing type includes a query type and a tracing type; when the first query / tracing type is a query type, the corresponding first query resource version is not empty; when the first query / tracing type is a tracing type, the corresponding first query resource version is empty.
[0019] Preferably, the step of performing text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result specifically includes:
[0020] Based on the first format specification, the first original file is processed to extract the header comment segment and the body code segment to obtain the corresponding first header comment segment and first body code segment.
[0021] And when the first header comment segment or the first body code segment is empty, the corresponding first compliance status is set to non-compliant, and the corresponding first parsing dataset is set to empty;
[0022] When both the first header comment segment and the first body code segment are not empty, the system identifies whether the total number of header comment lines in the first header comment segment is 7. If the total number of header comment lines in the first header comment segment is not 7, the corresponding first compliance status is set to non-compliant, and the corresponding first parsing dataset is set to empty. If the total number of header comment lines in the first header comment segment is 7, the system identifies whether the text format of all header comment lines meets the text format requirements of the first format specification. If at least one header comment line does not meet the requirements, the corresponding first compliance status is set to non-compliant, and the corresponding first parsing dataset is set to empty. If all header comment lines meet the requirements, the corresponding first compliance status is set to compliant, and the system performs corresponding keyword type + keyword content information extraction processing on all header comment lines to obtain the corresponding first updater identifier, first resource name, first resource type, first update time, first update type, first update description, and first shared personnel list to form the corresponding first parsing dataset.
[0023] The first parsing result is composed of the obtained first compliance status and the first parsing dataset.
[0024] Preferably, the step of updating the first shared resource library based on the first parsed dataset of the first parsing result, the first original file address, and the first converted file address to obtain the corresponding current update record specifically includes:
[0025] Extract the corresponding first updater identifier, first resource name, first resource type, first update time, first update type, first update description, and first shared personnel list from the first parsed dataset;
[0026] In the first shared resource list of the first shared resource library, the first resource record whose first resource name field matches the first resource name and whose first resource type field matches the first resource type is taken as the corresponding current resource record.
[0027] And it identifies whether the current resource record is empty;
[0028] If the current resource record is empty, a new first resource record is added to the first shared resource list as the corresponding new resource record; a new first resource version list is created in the first shared resource library as the corresponding new resource version list; a new first version record is added to the new resource version list as the corresponding new version record; a unique resource identifier is assigned to the new resource record as the corresponding new resource identifier; a unique list identifier is assigned to the new resource version list as the corresponding new list identifier; a unique resource version is assigned to the new version record as the corresponding new resource version; and the first version field, first updater identifier field, first update time field, first update type field, and first update description of the new version record are updated. The fields, first shared personnel list field, first original file address field, and first converted file address field are set to the corresponding newly added resource version, first updater identifier, first update time, first update type, first update description, first shared personnel list, first original file address, and first converted file address; and the first resource identifier field, first resource name field, first resource type field, first initial version field, first latest version field, and first list identifier field of the newly added resource record are set to the corresponding newly added resource identifier, first resource name, first resource type, newly added resource version, newly added resource version, and newly added list identifier; and the newly added resource record with the completed settings is used as the corresponding current update record;
[0029] If the current resource record is not empty, then the first resource version list corresponding to the first list identifier field of the current resource record in the first shared resource library is taken as the corresponding current resource version list; the first version field of the first version record whose first update time field is closest to the current time in the current resource version list is extracted as the corresponding previous resource version; and the previous version is sequentially updated based on the preset version update rules to obtain the corresponding current resource version; a new first version record is added to the current resource version list as the corresponding new version record; and the first version field, first updater identifier field, first update time field, first update type field, first update description field, first shared personnel list field, first original file address field, and first converted file address field of the new version record are set as the corresponding current resource version, first updater identifier, first update time, first update type, first update description, first shared personnel list, first original file address, and first converted file address; and the first latest version field of the current resource record is updated to the corresponding current resource version; and the current resource record with the settings completed is taken as the corresponding current update record.
[0030] Preferably, the process of sending mass notifications to personnel based on the current update record specifically includes:
[0031] Extract the first resource identifier field, first resource name field, first resource type field, first latest version field, and first list identifier field from the current update record to obtain the corresponding current resource identifier, current resource name, current resource type, current latest version, and current list identifier;
[0032] The first updater identifier field, first update time field, first update type field, first update description field, and first shared personnel list field of the first version record in the first resource version list corresponding to the current list identifier that matches the current latest version are extracted as the corresponding current updater identifier, current update time, current update type, current update description, and current shared personnel list.
[0033] The current resource identifier, the current resource name, the current resource type, the current latest version, the current updater identifier, the current update time, the current update type, and the current update description are input into a preset notification text module to synthesize the corresponding first notification text.
[0034] The first notification text is then sent to each of the first shared personnel notification interfaces in the current shared personnel list.
[0035] Preferably, the step of performing shared resource query / tracing processing on the first shared resource library according to the first query instruction specifically includes:
[0036] Extract the corresponding first query personnel notification interface, first query / tracing type, first query resource identifier, and first query resource version from the first query instruction;
[0037] The first list identifier field of the first resource record that matches the first resource identifier field of the first shared resource list in the first shared resource library with the first query resource identifier is extracted as the corresponding current list identifier; and the first resource version list in the first shared resource library that corresponds to the current list identifier is taken as the corresponding current resource version list.
[0038] When the current list identifier is empty, the corresponding first query response result is set to "the query content does not exist";
[0039] When the current list identifier is not empty and the first query / tracing type is a query type, the first version record in the current resource version list that matches the first version field with the first query resource version is taken as the corresponding current version record; and it is confirmed whether there is a first shared personnel notification interface matching the first query personnel notification interface in the first shared personnel list field of the current version record; if it is confirmed that there is no such interface, the corresponding first query feedback result is set to query permission not satisfied; if it is confirmed that there is such interface, the first converted file address field of the current version record is extracted as the corresponding first query feedback result.
[0040] When the current list identifier is not empty and the first query / tracing type is a tracing type, the first version record of the first shared personnel notification interface that matches the first query personnel notification interface in each of the first shared personnel list fields in the current resource version list is recorded as a corresponding first tracing record; and the total number of all the obtained first tracing records is counted to obtain the corresponding total number of first records; and it is identified whether the total number of first records is zero; if the total number of first records is zero, the corresponding first query feedback result is set to traceability permission not satisfied; if the total number of first records is greater than zero, the first version field, the first updater identifier field, the first update time field, the first update type field, the first update description field, and the first conversion file address field of each first tracing record are extracted to form the corresponding first tracing data, and all the obtained first tracing data are sorted by time to form the corresponding first query feedback result;
[0041] The obtained first query feedback result will be sent to the first query user notification interface.
[0042] A second aspect of the present invention provides an apparatus for implementing the processing method for updating shared resources as described in the first aspect above. The apparatus includes: a preprocessing module, an interface initiation module, a resource publishing module, and a resource query and tracing module.
[0043] The preprocessing module is configured to: pre-configure a database for storing shared resource information, denoted as the corresponding first shared resource library; configure a file receiving service interface for receiving Markdown format files, denoted as the corresponding first receiving interface; configure a file conversion service interface for converting Markdown format files to HTML format files based on a preset Markdown-HTML conversion tool, denoted as the corresponding first conversion interface; configure a resource library query service interface for receiving shared resource library information query commands, denoted as the corresponding first query interface; and configure a Markdown text format specification for standardizing the writing format of Markdown format files, denoted as the corresponding first format specification.
[0044] The interface startup module is used to start the first receiving interface and the first query interface into a continuous message listening state;
[0045] The resource publishing module is used to extract the corresponding Markdown format file from each data packet received by the first receiving interface as the corresponding first original file; and to perform text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result; and when the first compliance status of the first parsing result is compliant, to store the first original file to obtain the corresponding first original file address; and to call the first conversion interface to perform HTML format file conversion processing on the first original file based on the Markdown-HTML conversion tool to obtain the corresponding first converted file; and to store the first converted file to obtain the corresponding first converted file address; and to perform resource library update processing on the first shared resource library according to the first parsing dataset, the first original file address, and the first converted file address to obtain the corresponding current update record; and to perform mass notification processing based on the current update record; wherein the first parsing result includes the first compliance status and the first parsing dataset; and the first compliance status includes compliant and non-compliant.
[0046] The resource query and tracing module is used to extract the corresponding first query instruction from the data packet received by the first query interface each time it receives a data packet; and to perform shared resource query / tracing processing on the first shared resource library according to the first query instruction.
[0047] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0048] The processor is used to couple with the memory, read and execute instructions in the memory to implement the steps of the method described in the first aspect above;
[0049] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0050] A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the instructions described in the first aspect.
[0051] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for updating shared resources. As described above, this invention pre-configures a first shared resource library for storing shared resource information, a first receiving interface for receiving Markdown format files, a first conversion interface for converting Markdown format files to HTML format files using a Markdown-HTML conversion tool, a first query interface for receiving shared resource library information query commands, and a set of first format specifications for standardizing the writing format of Markdown format files. It also provides file format checking, file data parsing, HTML format file conversion, resource library updates, and mass notification functions for the Markdown format files received by the first receiving interface; and provides shared resource query / tracing functions for the first query commands received by the first query interface. In this embodiment of the invention, on the one hand, the processing mechanism of unifying the browsing file format of all shared resources into HTML format reduces the difficulty of user operation and improves the convenience of user browsing; on the other hand, the access permission configuration mechanism based on a single resource version as the basic unit provided by the first format specification reduces the workload of resource configuration and improves the flexibility of configuring resource access permissions and resource sharing scope; and on the third hand, the first shared resource library, which can store all historical version information of all shared resources published by all users, improves the efficiency of querying / tracing shared resources. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of a method for updating shared resources provided in Embodiment 1 of the present invention;
[0053] Figure 2 This is a module structure diagram of a processing device for updating shared resources provided in Embodiment 2 of the present invention;
[0054] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0056] Embodiment 1 of the present invention provides a method for updating shared resources, such as... Figure 1The schematic diagram shows a method for updating shared resources according to Embodiment 1 of the present invention. This method mainly includes the following steps:
[0057] Step 1: Pre-configure a database for storing shared resource information, denoted as the corresponding first shared resource repository; configure a file receiving service interface for receiving Markdown format files, denoted as the corresponding first receiving interface; configure a file conversion service interface for converting Markdown format files to HTML format files based on a preset Markdown-HTML conversion tool, denoted as the corresponding first conversion interface; configure a resource repository query service interface for receiving shared resource repository information query commands, denoted as the corresponding first query interface; and configure a Markdown text format specification for standardizing the writing format of Markdown format files, denoted as the corresponding first format specification.
[0058] Here, the Markdown format file used in this embodiment of the invention is a lightweight markup language file, which is essentially a type of plain text file. Its syntax is similar to that of Hyper Text Markup Language (HTML), but it is simpler than HTML. The conversion work from Markdown format file to HTML format file is very small. The Markdown-HTML conversion tool in this embodiment of the invention is a text file processing tool for implementing Markdown-HTML conversion.
[0059] The first shared resource library in this embodiment of the invention includes a first shared resource list and multiple first resource version lists; wherein,
[0060] The first shared resource list includes multiple first resource records; each first resource record corresponds one-to-one with a first resource version list; each first resource record includes a first resource identifier field, a first resource name field, a first resource type field, a first initial version field, a first latest version field, and a first list identifier field; the first resource type field includes multiple types of shared resources, which at least include meeting minutes, work notes, training materials, project documents, technical documents, and domain literature; the first list identifier field is the data table identifier for the corresponding first resource version list.
[0061] The first resource version list includes multiple first version records; each first version record includes a first version field, a first updater identifier field, a first update time field, a first update type field, a first update description field, a first shared personnel list field, a first original file address field, and a first converted file address field; the first update type field includes new, add, and modify; the first shared personnel list field includes one or more first shared personnel notification interfaces, one of which is the personnel notification interface corresponding to the first updater identifier field; here, the three update types (new, add, and modify) mentioned in this embodiment refer to the submission / publishing methods of resource updates, new means the first publication, add means adding new content on the basis of the original publication, and modify means modifying the original publication; the personnel notification interface mentioned in this embodiment can be an SMS interface, an email interface, an instant messaging software interface, or an office application software interface; among them, the instant messaging software interface includes at least the Weibo user notification interface and the WeChat user notification interface, and the office application software interface includes at least the DingTalk office software user notification interface and the user notification interfaces of various customized office OA systems.
[0062] In this embodiment of the invention, the first receiving interface, the first conversion interface, and the first query interface are all URL interfaces; the data message protocols of the first receiving interface, the first conversion interface, and the first query interface include at least HTTP / HTTPS message protocols and FTP message protocols.
[0063] The first format specification of this invention requires that Markdown format files be divided into a header comment section and a body code section; wherein,
[0064] The header comment section is located at the beginning of the Markdown file. It consists of seven header comment lines, with a newline character between each pair of adjacent lines, but no blank lines. The format of each header comment line is: beginning comment character + keyword type text + separator + keyword content text. The beginning comment character is a Markdown syntax comment character. The separator is a colon or equals sign. The keyword type text includes seven types: updater identifier keyword, resource name keyword, resource type keyword, update time keyword, update type keyword, update description keyword, and shared personnel list keyword. The keyword content text includes seven types of content text: updater identifier text, resource name text, resource type text, update time text, update type text, update description text, and shared personnel list text. The specific content text of the keyword content text corresponds one-to-one with the specific type of the keyword type text. The update type text includes "Create," "Add," and "Modify." The shared personnel list text includes one or more personnel notification interfaces, one of which corresponds to the updater identifier text. Each pair of personnel notification interfaces is separated by a comma or semicolon character.
[0065] The body code segment is located below the header comment segment up to the last line of the Markdown file; the body code segment consists of multiple lines of Markdown code; there must be at least one blank line between the first line of the body code segment and the last line of the header comment segment.
[0066] Step 2: Start the first receiving interface and the first query interface to enter a continuous message listening state.
[0067] Step 3: When the first receiving interface receives a data packet, it extracts the corresponding Markdown format file from the current data packet as the corresponding first original file; and performs text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result; when the first compliance status of the first parsing result is compliant, it stores the first original file to obtain the corresponding first original file address; and calls the first conversion interface to perform HTML format file conversion processing on the first original file based on the Markdown-HTML conversion tool to obtain the corresponding first converted file; and stores the first converted file to obtain the corresponding first converted file address; and updates the first shared resource library based on the first parsing dataset, the first original file address, and the first converted file address to obtain the corresponding update record for the current time; and performs mass notification processing based on the update record for personnel.
[0068] Specifically, this includes: Step 31, when the first receiving interface receives a data packet, extracting the corresponding Markdown format file from the current data packet as the corresponding first original file;
[0069] Here, after a user completes the writing of a Markdown format file for a shared resource based on the first format specification of this embodiment, the user will send the Markdown format file information written at this time in a data packet to the first receiving interface; and the first receiving interface of this embodiment can extract the corresponding Markdown format file from the data packet as the first original file after receiving it.
[0070] Step 32, and perform text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result;
[0071] The first parsing result includes a first compliance status and a first parsing dataset; the first compliance status includes compliant and non-compliant; the first parsing dataset includes a first updater identifier, a first resource name, a first resource type, a first update time, a first update type, a first update description, and a first shared personnel list; the first shared personnel list includes one or more second shared personnel notification interfaces, one of which is a personnel notification interface corresponding to the first updater identifier;
[0072] Specifically, it includes: step 321, extracting the header comment segment and body code segment from the first original file based on the first format specification to obtain the corresponding first header comment segment and first body code segment;
[0073] Step 322, and when the first header comment segment or the first body code segment is empty, set the corresponding first compliance status to non-compliance and set the corresponding first parsing dataset to empty;
[0074] Step 323: When both the first header comment segment and the first body code segment are not empty, identify whether the total number of header comment lines in the first header comment segment is 7; if the total number of header comment lines in the first header comment segment is not 7, set the corresponding first compliance status to non-compliant and set the corresponding first parsing dataset to empty; if the total number of header comment lines in the first header comment segment is 7, identify whether the text format of all header comment lines meets the comment line text format requirements of the first format specification; if at least one header comment line does not meet the requirements, set the corresponding first compliance status to non-compliant and set the corresponding first parsing dataset to empty; if all header comment lines meet the requirements, set the corresponding first compliance status to compliant, and perform corresponding keyword type + keyword content information extraction processing on all header comment lines to obtain the corresponding first updater identifier, first resource name, first resource type, first update time, first update type, first update description, and first shared personnel list to form the corresponding first parsing dataset;
[0075] Step 324, and the obtained first compliance status and the first parsing dataset constitute the corresponding first parsing result;
[0076] Step 33: When the first compliance status of the first parsing result is compliant, store the first original file to obtain the corresponding first original file address;
[0077] Here, the address format of the first original file address in this embodiment of the invention is URL format;
[0078] Step 34, and call the first conversion interface to perform HTML format file conversion on the first original file based on the Markdown-HTML conversion tool to obtain the corresponding first converted file;
[0079] Step 35, and save the first converted file to obtain the corresponding address of the first converted file;
[0080] Here, the address format of the first converted file address in this embodiment of the invention is URL format;
[0081] Step 36: Based on the first parsed dataset, the first original file address, and the first converted file address of the first parsing result, perform resource library update processing on the first shared resource library to obtain the corresponding current update record;
[0082] Specifically, this includes: Step 361, extracting the corresponding first updater identifier, first resource name, first resource type, first update time, first update type, first update description, and first shared personnel list from the first parsed dataset;
[0083] Step 362: Take the first resource record in the first shared resource list of the first shared resource library that matches the first resource name field with the first resource name and the first resource type field with the first resource type as the corresponding current resource record;
[0084] Step 363, and identify whether the current resource record is empty;
[0085] Step 364: If the current resource record is empty, add a new first resource record in the first shared resource list as the corresponding new resource record; create a new first resource version list in the first shared resource library as the corresponding new resource version list; add a new first version record in the new resource version list as the corresponding new version record; assign a unique resource identifier to the new resource record as the corresponding new resource identifier; assign a unique list identifier to the new resource version list as the corresponding new list identifier; assign a unique resource version to the new version record as the corresponding new resource version; and set the first version field, first updater identifier field, first update time field, and first update time field of the new version record as the corresponding new resource version record. Set the update type field, first update description field, first shared personnel list field, first original file address field, and first converted file address field to the corresponding new resource version, first update personnel identifier, first update time, first update type, first update description, first shared personnel list, first original file address, and first converted file address; and set the first resource identifier field, first resource name field, first resource type field, first initial version field, first latest version field, and first list identifier field of the new resource record to the corresponding new resource identifier, first resource name, first resource type, new resource version, new resource version, and new list identifier; and use the newly added resource record with the completed settings as the corresponding current update record;
[0086] Step 365: If the current resource record is not empty, then the first resource version list corresponding to the first list identifier field of the current resource record in the first shared resource library is taken as the corresponding current resource version list; the first version field of the first version record whose first update time field is closest to the current time in the current resource version list is extracted as the corresponding previous resource version; and the previous version is sequentially updated according to the preset version update rules to obtain the corresponding current resource version; a new first version record is added to the current resource version list as the corresponding new version record; and the first version field, first updater identifier field, first update time field, first update type field, first update description field, first shared personnel list field, first original file address field, and first converted file address field of the new version record are set to the corresponding current resource version, first updater identifier, first update time, first update type, first update description, first shared personnel list, first original file address, and first converted file address; the first latest version field of the current resource record is updated to the corresponding current resource version; and the current resource record with the completed settings is taken as the corresponding current update record.
[0087] Here, the version update rule is a pre-set processing rule for automatically updating the version number one by one. This version update rule can be set according to specific application requirements. One common version update rule is the rule of incrementing by 1 each time, that is, the current resource version = the previous resource version + 1.
[0088] Step 37, and based on the current update record, perform mass notification processing for personnel;
[0089] Specifically, this includes: Step 371, extracting the first resource identifier field, first resource name field, first resource type field, first latest version field, and first list identifier field from the current update record as the corresponding current resource identifier, current resource name, current resource type, current latest version, and current list identifier;
[0090] Step 372: Extract the first updater identifier field, first update time field, first update type field, first update description field, and first shared personnel list field of the first version record in the first resource version list corresponding to the current list identifier in the first shared resource library that match the current latest version. These fields are used as the corresponding current updater identifier, current update time, current update type, current update description, and current shared personnel list.
[0091] Step 373: Input the current resource identifier, current resource name, current resource type, current latest version, current updater identifier, current update time, current update type, and current update description into the preset notification text module to synthesize the notification text and obtain the corresponding first notification text;
[0092] Step 374, and send the first notification text to each first shared personnel notification interface in the current shared personnel list.
[0093] Step 4: When the first query interface receives a data packet, it extracts the corresponding first query instruction from the current data packet; and performs shared resource query / tracing processing on the first shared resource library according to the first query instruction.
[0094] Specifically, this includes: Step 41, when the first query interface receives a data packet, it extracts the corresponding first query instruction from the current data packet;
[0095] The first query instruction includes a first query personnel notification interface, a first query / tracing type, a first query resource identifier, and a first query resource version; the first query / tracing type includes a query type and a tracing type; when the first query / tracing type is a query type, the corresponding first query resource version is not empty; when the first query / tracing type is a tracing type, the corresponding first query resource version is empty.
[0096] Here, if a user wants to query the shared resources mentioned in the first notification text, they can use their corresponding personnel notification interface as the corresponding first query personnel notification interface, set the first query / tracing type as the query type, and use the resource identifier and version in the first notification text as the corresponding first query resource identifier and first query resource version. The first query instruction is then composed of the first query personnel notification interface, the first query / tracing type, the first query resource identifier, and the first query resource version received at this time, and is sent to the first query interface in a data packet. Additionally, if a user wants to query the shared resources mentioned in the first notification text, they can use their own corresponding personnel notification interface as the first query personnel notification interface, the first query / tracing type, the first query resource identifier, and the first query resource version received at this time. To trace shared resources, the system can use its own corresponding personnel notification interface as the corresponding first query personnel notification interface, set the first query / tracing type as the tracing type, use the resource identifier in the first notification text as the corresponding first query resource identifier, set the first query resource version to empty, and use the first query personnel notification interface, the first query / tracing type, the first query resource identifier, and the first query resource version obtained at this time to form the corresponding first query instruction. The first query instruction obtained at this time is then carried in a data packet and sent to the first query interface. After receiving the data packet sent by the user, the first query interface of this embodiment can extract the corresponding first query instruction from it.
[0097] Step 42, and perform shared resource query / tracing processing on the first shared resource library according to the first query instruction;
[0098] Specifically, this includes: Step 421, extracting the corresponding first query personnel notification interface, first query / tracing type, first query resource identifier and first query resource version from the first query instruction;
[0099] Step 422: Extract the first list identifier field of the first resource record that matches the first resource identifier field of the first shared resource list in the first shared resource library as the corresponding current list identifier; and take the first resource version list in the first shared resource library that corresponds to the current list identifier as the corresponding current resource version list.
[0100] Step 423: When the current list identifier is empty, set the corresponding first query response result to "the query content does not exist";
[0101] Step 424: When the current list identifier is not empty and the first query / tracing type is query type, take the first version record in the current resource version list that matches the first version field of the first query resource version as the corresponding current version record; and confirm whether there is a first shared personnel notification interface in the first shared personnel list field of the current version record that matches the first query personnel notification interface; if it is confirmed that there is no first shared personnel notification interface, set the corresponding first query feedback result to query permission not satisfied; if it is confirmed that there is a first shared personnel notification interface, extract the first shared personnel notification interface field of the current version record as the corresponding first query feedback result.
[0102] Step 425: When the current list identifier is not empty and the first query / tracing type is tracing type, record the first version record of the first shared personnel notification interface that matches the first query personnel notification interface in each first shared personnel list field in the current resource version list as a corresponding first tracing record; and count the total number of all obtained first tracing records to obtain the corresponding total number of first records; and identify whether the total number of first records is zero; if the total number of first records is zero, set the corresponding first query feedback result to trace permission not satisfied; if the total number of first records is greater than zero, extract the first version field, first update personnel identifier field, first update time field, first update type field, first update description field, and first conversion file address field of each first tracing record to form the corresponding first tracing data, and sort all obtained first tracing data in chronological order to form the corresponding first query feedback result;
[0103] Step 426, and send the obtained first query feedback result to the first queryer notification interface.
[0104] Figure 2 This is a module structure diagram of a processing device for updating shared resources provided in Embodiment 2 of the present invention. This device can be a terminal device or server implementing the aforementioned method embodiments, or it can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiments. For example, the device can be a device or chip system of the aforementioned terminal device or server. Figure 2 As shown, the device includes: a preprocessing module 201, an interface startup module 202, a resource publishing module 203, and a resource query and tracing module 204.
[0105] The preprocessing module 201 is used to pre-configure a database for storing shared resource information, denoted as the corresponding first shared resource library; and to configure a file receiving service interface for receiving Markdown format files, denoted as the corresponding first receiving interface; and to configure a file conversion service interface for converting Markdown format files to HTML format files based on a preset Markdown-HTML conversion tool, denoted as the corresponding first conversion interface; and to configure a resource library query service interface for receiving shared resource library information query commands, denoted as the corresponding first query interface; and to configure a Markdown text format specification for standardizing the writing format of Markdown format files, denoted as the corresponding first format specification.
[0106] The interface startup module 202 is used to start the first receiving interface and the first query interface into a continuous message listening state.
[0107] The resource publishing module 203 is used to extract the corresponding Markdown format file from each data packet received by the first receiving interface as the corresponding first original file; and to perform text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result; and to store the first original file to obtain the corresponding first original file address when the first compliance status of the first parsing result is compliant; and to call the first conversion interface to perform HTML format file conversion processing on the first original file based on the Markdown-HTML conversion tool to obtain the corresponding first converted file; and to store the first converted file to obtain the corresponding first converted file address; and to perform resource library update processing on the first shared resource library according to the first parsing dataset, the first original file address, and the first converted file address of the first parsing result to obtain the corresponding update record for the current time; and to perform mass notification processing on the current update record; the first parsing result includes the first compliance status and the first parsing dataset; the first compliance status includes compliant and non-compliant.
[0108] The resource query and tracing module 204 is used to extract the corresponding first query instruction from the data message received by the first query interface each time a data message is received; and to perform shared resource query / tracing processing on the first shared resource library according to the first query instruction.
[0109] The present invention provides a processing device for updating shared resources, which can execute the method steps in the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0110] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the preprocessing module can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and called and executed by a processing element of the device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0111] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs). Furthermore, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of calling program code. Additionally, these modules can be integrated together as a system-on-a-chip (SoC).
[0112] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the foregoing method embodiments are generated. The computer described above can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, Bluetooth, microwave, etc.) means. The aforementioned computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0113] Figure 3 This is a schematic diagram of an electronic device provided in Embodiment 3 of the present invention. This electronic device can be a terminal device or server implementing the methods of the aforementioned embodiments, or it can be a terminal device or server connected to the aforementioned terminal device or server implementing the methods of the aforementioned embodiments. Figure 3 As shown, the electronic device may include: a processor 301 (e.g., CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transmission and reception operations of the transceiver 303. The memory 302 may store various instructions for performing various processing functions and implementing the processing steps described in the foregoing embodiments. Preferably, the electronic device involved in the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The communication port 306 is used for communication between the electronic device and other peripherals.
[0114] exist Figure 3The system bus 305 mentioned can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include Random Access Memory (RAM) and may also include Non-Volatile Memory, such as at least one disk storage device.
[0115] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0116] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when run on a computer, cause the computer to perform the methods and processes provided in the above embodiments.
[0117] This invention also provides a chip for executing instructions, which is used to perform the processing steps described in the foregoing method embodiments.
[0118] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for updating shared resources. As described above, this invention pre-configures a first shared resource library for storing shared resource information, a first receiving interface for receiving Markdown format files, a first conversion interface for converting Markdown format files to HTML format files using a Markdown-HTML conversion tool, a first query interface for receiving shared resource library information query commands, and a set of first format specifications for standardizing the writing format of Markdown format files. It also provides file format checking, file data parsing, HTML format file conversion, resource library updates, and mass notification functions for the Markdown format files received by the first receiving interface; and provides shared resource query / tracing functions for the first query commands received by the first query interface. In this embodiment of the invention, on the one hand, the processing mechanism of unifying the browsing file format of all shared resources into HTML format reduces the difficulty of user operation and improves the convenience of user browsing; on the other hand, the access permission configuration mechanism based on a single resource version as the basic unit provided by the first format specification reduces the workload of resource configuration and improves the flexibility of configuring resource access permissions and resource sharing scope; and on the third hand, the first shared resource library, which can store all historical version information of all shared resources published by all users, improves the efficiency of querying / tracing shared resources.
[0119] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0120] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0121] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for updating shared resources, characterized in that, The method includes: A database for storing shared resource information is pre-configured, denoted as the corresponding first shared resource repository; a file receiving service interface for receiving Markdown format files is configured, denoted as the corresponding first receiving interface; a file conversion service interface for converting Markdown format files to HTML format files based on a pre-defined Markdown-HTML conversion tool is configured, denoted as the corresponding first conversion interface; a resource repository query service interface for receiving shared resource repository information query commands is configured, denoted as the corresponding first query interface; and a Markdown text format specification for standardizing the writing format of Markdown format files is configured, denoted as the corresponding first format specification. The first receiving interface and the first query interface are started and put into a continuous message listening state; Each time the first receiving interface receives a data packet, it extracts the corresponding Markdown format file from the current data packet as the corresponding first original file; and performs text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result; and when the first compliance status of the first parsing result is compliant, it stores the first original file to obtain the corresponding first original file address; and calls the first conversion interface to perform HTML format file conversion processing on the first original file based on the Markdown-HTML conversion tool to obtain the corresponding first converted file; and stores the first converted file to obtain the corresponding first converted file address; and updates the first shared resource library according to the first parsing dataset, the first original file address, and the first converted file address to obtain the corresponding current update record; and performs mass notification processing based on the current update record; the first parsing result includes the first compliance status and the first parsing dataset; the first compliance status includes compliant and non-compliant. Each time the first query interface receives a data packet, it extracts the corresponding first query instruction from the current data packet; and performs shared resource query / tracing processing on the first shared resource library according to the first query instruction. The first format specification requires that Markdown format files be divided into a header comment section and a body code section; The header comment section is located at the beginning of the Markdown file; the header comment section consists of seven header comment lines, with a newline character between every two adjacent header comment lines but no blank lines; the text format of each header comment line is as follows: beginning comment character + keyword type text + separator + keyword content text; the beginning comment character is a Markdown syntax comment character; the separator is a colon or equals sign character; the keyword type text includes seven types, namely updater identifier keyword, resource name keyword, resource type keyword, update time keyword, update type keyword, and update description keyword. The text includes keywords for the shared personnel list; the keyword content text includes seven types of content text, namely updater identifier text, resource name text, resource type text, update time text, update type text, update description text, and shared personnel list text; the specific content text of the keyword content text corresponds one-to-one with the specific type of the keyword type text; the update type text includes new, add, and modify; the shared personnel list text includes one or more personnel notification interfaces, one of which is the personnel notification interface corresponding to the updater identifier text, and each pair of personnel notification interfaces is separated by a comma or a pause character as the corresponding personnel separator; The body code segment is located below the header comment segment up to the last line of the Markdown file; the body code segment consists of multiple lines of Markdown code; there is at least one blank line character between the first line of the body code segment and the last line of the header comment segment. The step of parsing the first original file based on the first format specification to obtain the corresponding first parsing result specifically includes: Based on the first format specification, the first original file is processed to extract the header comment segment and the body code segment to obtain the corresponding first header comment segment and first body code segment. And when the first header comment segment or the first body code segment is empty, the corresponding first compliance status is set to non-compliant, and the corresponding first parsing dataset is set to empty; When neither the first header comment segment nor the first body code segment is empty, the system identifies whether the total number of header comment lines in the first header comment segment is 7. If the total number of header comment lines in the first header comment segment is not 7, the corresponding first compliance status is set to non-compliant, and the corresponding first parsing dataset is set to empty. If the total number of header comment lines in the first header comment segment is 7, the system identifies whether the text format of all header comment lines meets the text format requirements of the first format specification. If at least one header comment line does not meet the requirements, the corresponding first compliance status is set to non-compliant, and the corresponding first parsing dataset is set to empty. If all header comment lines meet the requirements, the corresponding first compliance status is set to compliant, and the system performs corresponding keyword type + keyword content information extraction processing on all header comment lines to obtain the corresponding first updater identifier, first resource name, first resource type, first update time, first update type, first update description, and first shared personnel list to form the corresponding first parsing dataset. The first parsing result is composed of the obtained first compliance status and the first parsing dataset.
2. The method for updating shared resources according to claim 1, characterized in that, The first shared resource library includes a first shared resource list and multiple first resource version lists; The first shared resource list includes multiple first resource records; each first resource record corresponds one-to-one with the first resource version list; each first resource record includes a first resource identifier field, a first resource name field, a first resource type field, a first initial version field, a first latest version field, and a first list identifier field; the first resource type field includes multiple types of shared resources, which at least include meeting minutes, work notes, training materials, project documents, technical documents, and domain literature; the first list identifier field is the data table identifier of the corresponding first resource version list. The first resource version list includes multiple first version records; the first version record includes a first version field, a first updater identifier field, a first update time field, a first update type field, a first update description field, a first shared personnel list field, a first original file address field, and a first converted file address field; the first update type field includes new, add, and modify; the first shared personnel list field includes one or more first shared personnel notification interfaces, one of which is a personnel notification interface corresponding to the first updater identifier field; The first receiving interface, the first conversion interface, and the first query interface are all URL interfaces; the data message protocols of the first receiving interface, the first conversion interface, and the first query interface include at least HTTP / HTTPS message protocols and FTP message protocols; The first parsed dataset includes a first updater identifier, a first resource name, a first resource type, a first update time, a first update type, a first update description, and a first shared personnel list; the first shared personnel list includes one or more second shared personnel notification interfaces, wherein one of the second shared personnel notification interfaces is a personnel notification interface corresponding to the first updater identifier; The address format of the first original file address and the address of the first converted file is URL format; The first query instruction includes a first query personnel notification interface, a first query / tracing type, a first query resource identifier, and a first query resource version; the first query / tracing type includes a query type and a tracing type; when the first query / tracing type is a query type, the corresponding first query resource version is not empty; when the first query / tracing type is a tracing type, the corresponding first query resource version is empty.
3. The method for updating shared resources according to claim 2, characterized in that, The step of updating the first shared resource library based on the first parsed dataset, the first original file address, and the first converted file address to obtain the corresponding current update record specifically includes: Extract the corresponding first updater identifier, first resource name, first resource type, first update time, first update type, first update description, and first shared personnel list from the first parsed dataset; In the first shared resource list of the first shared resource library, the first resource record whose first resource name field matches the first resource name and whose first resource type field matches the first resource type is taken as the corresponding current resource record. And it identifies whether the current resource record is empty; If the current resource record is empty, a new first resource record is added to the first shared resource list as the corresponding new resource record; a new first resource version list is created in the first shared resource library as the corresponding new resource version list; a new first version record is added to the new resource version list as the corresponding new version record; a unique resource identifier is assigned to the new resource record as the corresponding new resource identifier; a unique list identifier is assigned to the new resource version list as the corresponding new list identifier; a unique resource version is assigned to the new version record as the corresponding new resource version; and the first version field, first updater identifier field, first update time field, first update type field, and first update description of the new version record are updated. The fields, first shared personnel list field, first original file address field, and first converted file address field are set to the corresponding newly added resource version, first updater identifier, first update time, first update type, first update description, first shared personnel list, first original file address, and first converted file address; and the first resource identifier field, first resource name field, first resource type field, first initial version field, first latest version field, and first list identifier field of the newly added resource record are set to the corresponding newly added resource identifier, first resource name, first resource type, newly added resource version, newly added resource version, and newly added list identifier; and the newly added resource record with the completed settings is used as the corresponding current update record; If the current resource record is not empty, then the first resource version list corresponding to the first list identifier field of the current resource record in the first shared resource library is taken as the corresponding current resource version list; the first version field of the first version record whose first update time field is closest to the current time in the current resource version list is extracted as the corresponding previous resource version; and the previous resource version is sequentially updated based on the preset version update rules to obtain the corresponding current resource version; a new first version record is added to the current resource version list as the corresponding new version record; and the first version field, first updater identifier field, first update time field, first update type field, first update description field, first shared personnel list field, first original file address field, and first converted file address field of the new version record are set to the corresponding current resource version, first updater identifier, first update time, first update type, first update description, first shared personnel list, first original file address, and first converted file address; the first latest version field of the current resource record is updated to the corresponding current resource version; and the current resource record with the completed settings is taken as the corresponding current update record.
4. The method for updating shared resources according to claim 2, characterized in that, The process of sending mass notifications to personnel based on the current update record specifically includes: Extract the first resource identifier field, first resource name field, first resource type field, first latest version field, and first list identifier field from the current update record to obtain the corresponding current resource identifier, current resource name, current resource type, current latest version, and current list identifier; The first updater identifier field, first update time field, first update type field, first update description field, and first shared personnel list field of the first version record in the first resource version list corresponding to the current list identifier that matches the current latest version are extracted as the corresponding current updater identifier, current update time, current update type, current update description, and current shared personnel list. The current resource identifier, the current resource name, the current resource type, the current latest version, the current updater identifier, the current update time, the current update type, and the current update description are input into a preset notification text module to synthesize the corresponding first notification text. The first notification text is then sent to each of the first shared personnel notification interfaces in the current shared personnel list.
5. The method for updating shared resources according to claim 2, characterized in that, The step of performing shared resource query / tracing processing on the first shared resource library according to the first query instruction specifically includes: Extract the corresponding first query personnel notification interface, first query / tracing type, first query resource identifier, and first query resource version from the first query instruction; The first list identifier field of the first resource record that matches the first resource identifier field of the first shared resource list in the first shared resource library with the first query resource identifier is extracted as the corresponding current list identifier; and the first resource version list in the first shared resource library that corresponds to the current list identifier is taken as the corresponding current resource version list. When the current list identifier is empty, the corresponding first query response result is set to "the query content does not exist"; When the current list identifier is not empty and the first query / tracing type is a query type, the first version record in the current resource version list that matches the first version field with the first query resource version is taken as the corresponding current version record; and it is confirmed whether there is a first shared personnel notification interface matching the first query personnel notification interface in the first shared personnel list field of the current version record; if it is confirmed that there is no such interface, the corresponding first query feedback result is set to query permission not satisfied; if it is confirmed that there is such interface, the first converted file address field of the current version record is extracted as the corresponding first query feedback result. When the current list identifier is not empty and the first query / tracing type is a tracing type, the first version record of the first shared personnel notification interface that matches the first query personnel notification interface in each of the first shared personnel list fields in the current resource version list is recorded as a corresponding first tracing record; and the total number of all the obtained first tracing records is counted to obtain the corresponding total number of first records; and it is identified whether the total number of first records is zero; if the total number of first records is zero, the corresponding first query feedback result is set to traceability permission not satisfied; if the total number of first records is greater than zero, the first version field, the first updater identifier field, the first update time field, the first update type field, the first update description field, and the first conversion file address field of each first tracing record are extracted to form the corresponding first tracing data, and all the obtained first tracing data are sorted by time to form the corresponding first query feedback result; The obtained first query feedback result will be sent to the first query user notification interface.
6. An apparatus for performing the processing method for updating shared resources according to any one of claims 1-5, characterized in that, The device includes: a preprocessing module, an interface initiation module, a resource publishing module, and a resource query and tracing module; The preprocessing module is configured to: pre-configure a database for storing shared resource information, denoted as the corresponding first shared resource library; configure a file receiving service interface for receiving Markdown format files, denoted as the corresponding first receiving interface; configure a file conversion service interface for converting Markdown format files to HTML format files based on a preset Markdown-HTML conversion tool, denoted as the corresponding first conversion interface; configure a resource library query service interface for receiving shared resource library information query commands, denoted as the corresponding first query interface; and configure a Markdown text format specification for standardizing the writing format of Markdown format files, denoted as the corresponding first format specification. The interface startup module is used to start the first receiving interface and the first query interface into a continuous message listening state; The resource publishing module is used to extract the corresponding Markdown format file from each data packet received by the first receiving interface as the corresponding first original file; and to perform text parsing on the first original file based on the first format specification to obtain the corresponding first parsing result; and when the first compliance status of the first parsing result is compliant, to store the first original file to obtain the corresponding first original file address; and to call the first conversion interface to perform HTML format file conversion processing on the first original file based on the Markdown-HTML conversion tool to obtain the corresponding first converted file; and to store the first converted file to obtain the corresponding first converted file address; and to perform resource library update processing on the first shared resource library according to the first parsing dataset, the first original file address, and the first converted file address to obtain the corresponding current update record; and to perform mass notification processing based on the current update record; wherein the first parsing result includes the first compliance status and the first parsing dataset; and the first compliance status includes compliant and non-compliant. The resource query and tracing module is used to extract the corresponding first query instruction from the data packet received by the first query interface each time it receives a data packet; and to perform shared resource query / tracing processing on the first shared resource library according to the first query instruction.
7. An electronic device, characterized in that, include: Memory, processor, and transceiver; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-5; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1-5.
Citation Information
Patent Citations
Method, device and equipment for automatically generating online document and medium
CN116561087A