An authorization method and device of an electronic document, an electronic device, and a storage medium
By determining the signature type of an electronic document based on the signature request and obtaining the corresponding verification algorithm, the problem of the single algorithm limitation in the existing technology is solved, realizing the application of multiple algorithms for electronic signatures, and improving the applicability of electronic documents and the reliability of signatures.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN DIGITAL CERTIFICATE AUTHORITY CENT CO LTD
- Filing Date
- 2022-03-24
- Publication Date
- 2026-05-05
AI Technical Summary
Existing electronic signature technologies only support a single algorithm, which makes electronic documents unusable in scenarios that require other algorithms, reducing the applicability of electronic documents and the authenticity and reliability of signatures.
By determining the signature type of an electronic document, obtaining the verification algorithm associated with that signature type, performing verification and recognition, and generating signature data associated with the signature type when the verification is successful, importing it into the signature field of the electronic document, thus realizing the flexible application of multiple algorithms.
It improves the flexibility and reliability of electronic document signing, and enhances the flexibility of the document authorization process and the authenticity of the signature.
Smart Images

Figure CN114611158B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to an electronic document authorization method, apparatus, electronic device and storage medium. Background Technology
[0002] With the continuous advancement of digitalization, more and more documents can be stored in digital form. In order to realize the legitimacy, authenticity and non-repudiation of electronic documents, electronic signature technology has emerged, thereby further expanding the scope of use of electronic documents.
[0003] Existing electronic signature technologies often only support a single algorithm for signing electronic documents. In scenarios where other algorithms are required, such electronic documents cannot be used, which greatly reduces the applicability of electronic documents. Furthermore, the limited range of electronic signature algorithms also reduces the authenticity of the signature and the reliability of the electronic document. Summary of the Invention
[0004] This application provides an electronic document authorization method, apparatus, electronic device, and storage medium, which can solve the problem that existing electronic document authorization technologies often only support electronic signatures with a single algorithm when signing electronic documents. In scenarios where other algorithms are required to sign electronic documents, this type of electronic document cannot be used, which greatly reduces the applicability of electronic documents. Furthermore, due to the single electronic signature algorithm, the authenticity of the signature and the reliability of the electronic document are also reduced.
[0005] In a first aspect, embodiments of this application provide a method for authorizing electronic documents, including:
[0006] If a signature request for an electronic document to be signed is received, the signature type of the electronic document is determined.
[0007] The verification result of the electronic document is identified based on the verification algorithm associated with the signature type.
[0008] If the verification result is successful, then signature data associated with the signature type is generated;
[0009] The signature data is imported into the signature field of the electronic document to obtain an authorized document with an electronic signature.
[0010] In one possible implementation of the first aspect, determining the signature type of the electronic document upon receiving a signature request for the electronic document to be signed includes:
[0011] Extract the document keywords of the electronic document, and generate the semantic feature vector of the electronic document based on all the document keywords;
[0012] Obtain the user information of the user to whom the electronic document belongs, and generate a user feature vector corresponding to the user information;
[0013] Determine the publication scenario information of the electronic document, and determine the application feature vector of the electronic document based on the publication scenario information;
[0014] The semantic feature vector, the user feature vector, and the application feature vector are convolved based on a preset convolution kernel to generate a multidimensional feature matrix of the electronic document.
[0015] Based on the matching degree between the multidimensional feature matrix and each candidate type, the candidate type with the highest matching degree is selected as the signature type of the electronic document.
[0016] In one possible implementation of the first aspect, the step of extracting document keywords from the electronic document and generating a semantic feature vector based on all the document keywords includes:
[0017] Semantic analysis is performed on the electronic document to determine candidate keywords contained in the electronic document;
[0018] Based on all the candidate keywords, a keyword graph of the electronic document is constructed, and the word association degree between any candidate keyword and other candidate keywords is calculated based on the keyword graph; the word association degree is specifically:
[0019]
[0020] in, The degree of relevance of the term; This represents the number of associations between the i-th candidate keyword and other candidate keywords in the predefined keyword graph. The number of associations between other candidate keywords and the j-th candidate keyword in the keyword graph;
[0021] Based on the occurrence position of any candidate keyword in the electronic document, determine the position feature value of any candidate keyword;
[0022] Based on the first occurrence frequency of any candidate keyword in the electronic document and the second occurrence frequency in existing text in a preset corpus, a frequency feature value for each candidate keyword is determined; the frequency feature value is specifically:
[0023]
[0024] in, The frequency feature value; The word frequency feature value is calculated based on the first occurrence frequency and the second occurrence frequency of any candidate keyword.
[0025] Calculate the feature index corresponding to any candidate keyword based on word relevance, position feature value, and frequency feature value;
[0026] Candidate keywords whose feature index is greater than a preset threshold are selected as document keywords for the electronic document.
[0027] In one possible implementation of the first aspect, the step of generating signature data associated with the signature type if the verification and identification result is successful includes:
[0028] Based on the signature request and the document content of the electronic document, determine the range of document data that needs to be signed;
[0029] Calculate the hash value of the document data range based on the document data contained within the document data range and the signature type;
[0030] The signature data is obtained by performing data transformation on the hash value and the document data using the signature algorithm associated with the signature type.
[0031] In one possible implementation of the first aspect, determining the range of document data to be signed based on the signature request and the document content of the electronic document includes:
[0032] The signature request is parsed to determine the scope of authorization associated with the signature request;
[0033] Perform semantic recognition on the electronic document and extract word cloud information corresponding to each text paragraph of the electronic document;
[0034] Calculate the matching degree between each word cloud information and the authorized scope, and select the text paragraph corresponding to the word cloud information with a matching degree greater than a preset matching threshold as the target paragraph;
[0035] The document data range is determined based on the text data contained within the target paragraph.
[0036] In one possible implementation of the first aspect, the step of identifying the verification result of the electronic document based on the verification algorithm associated with the signature type includes:
[0037] Obtain the signature information associated with the electronic document and determine the valid authorization scope of the signature information;
[0038] The verification and identification items are determined according to the verification algorithm;
[0039] Extract the authorization feature value corresponding to each of the verification and identification items from the valid authorization range, and generate the verification and identification result based on all the authorization feature values.
[0040] In one possible implementation of the first aspect, after importing the signature data into the signature field of the electronic document to obtain an authorized document with an added electronic signature, the method further includes:
[0041] If an authorization request for the authorized electronic document is received, the signature type of the authorized document is determined;
[0042] Select the authentication algorithm corresponding to the signature type from the authentication database;
[0043] The signature data is extracted from the authorized document, and the signature data is authenticated and identified using the authentication algorithm to obtain the authentication result.
[0044] Secondly, embodiments of this application provide an electronic document authorization device, comprising:
[0045] A signature type determination unit is used to determine the signature type of an electronic document if a signature request for an electronic document to be signed is received.
[0046] The verification and recognition result generation unit is used to identify the verification and recognition result of the electronic document according to the verification algorithm associated with the signature type;
[0047] A signature data generation unit is used to generate signature data associated with the signature type if the verification and identification result is that the verification is passed.
[0048] The signature data import unit is used to import signature data into the signature field of the electronic document to obtain an authorized document with an electronic signature.
[0049] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any of the first aspects above.
[0050] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the first aspects above.
[0051] Fifthly, embodiments of this application provide a computer program product that, when run on a server, causes the server to execute the method described in any one of the first aspects.
[0052] The beneficial effects of this application embodiment compared with the prior art are as follows: Before signing an electronic document, the signature type corresponding to the electronic document can be determined according to the signature request, and the verification algorithm associated with the signature type can be obtained. The verification algorithm is used to determine whether the electronic document is legal, that is, whether it meets the requirements for adding an electronic signature. If the above verification and identification result is that the verification passes, it means that the electronic document is a legal document. At this time, the corresponding signature data can be generated and added to the signature field corresponding to the electronic document, thereby generating an authorized document with an electronic signature, thus achieving the purpose of adding an electronic signature to the electronic document. Compared with the existing electronic document authorization technology, it does not bind different electronic documents with corresponding signature algorithms. Instead, it determines the corresponding signature type according to the corresponding signature request and verifies the electronic document through the verification algorithm of the signature type. It can flexibly change the verification algorithm used for the electronic document, and when the verification passes, the signature data corresponding to the signature type is imported into the signature field of the electronic document to obtain the corresponding authorized document. This improves the flexibility of the document authorization process and further improves the reliability and authenticity of electronic document signatures. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a flowchart illustrating the implementation of an electronic document authorization method according to an embodiment of this application;
[0055] Figure 2 This is a flowchart illustrating the implementation of an electronic document authorization method S101 provided in an embodiment of this application;
[0056] Figure 3 This is a schematic diagram of an implementation of S103 of an electronic document authorization method provided in an embodiment of this application;
[0057] Figure 4 This is a schematic diagram illustrating an implementation of S102 of an electronic document authorization method provided in an embodiment of this application;
[0058] Figure 5This is a schematic diagram illustrating one implementation of an electronic document authorization method provided in an embodiment of this application;
[0059] Figure 6 This is a schematic diagram of the structure of the electronic document authorization device provided in the embodiments of this application;
[0060] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0061] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0062] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0063] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0064] The electronic document authorization method provided in this application can be applied to electronic devices capable of performing electronic document authorization operations, such as smartphones, servers, tablets, laptops, ultra-mobile personal computers (UMPCs), netbooks, and servers. This application does not impose any limitations on the specific type of electronic device.
[0065] Please see Figure 1 , Figure 1 The illustration shows an implementation diagram of an electronic document authorization method provided in an embodiment of this application. The method includes the following steps:
[0066] In S101, if a signature request for an electronic document to be signed is received, the signature type of the electronic document is determined.
[0067] In this embodiment, when a user needs to sign an electronic document, they can initiate a signature request to the electronic device. This signature request carries the document identifier of the electronic document requiring the signature and the desired signature type. The electronic device can parse the signature request, determine the value of the signature field, and thus determine the signature type of the electronic document.
[0068] In one possible implementation, each electronic document can be pre-associated with a corresponding signature type. For example, for an electronic document published by a company, the corresponding electronic signature type is a company seal; for an electronic document published by an individual, the corresponding electronic signature type is a personal seal; and for a national standard document, the corresponding electronic signature type is a national cryptographic electronic seal. Based on this, the electronic device can store a correspondence table between document types and signature types. By determining the document type of the electronic document indicated in the signature request and querying the aforementioned correspondence table, the signature type associated with the document type can be determined.
[0069] In one possible implementation, the electronic device is specifically a server for electronic signatures. In this case, each user terminal can install a client program corresponding to the server, connect to the server through the client program, and send a signature request to the server to sign a local electronic document. The user terminal can encapsulate the electronic document in the signature request so that the server can extract the electronic document to be signed from the signature request after receiving it. If the electronic document is stored in the cloud, the user terminal can add a download link of the electronic document to the signature request, and the server can obtain the electronic document through the download link.
[0070] In S102, the verification result of the electronic document is identified according to the verification algorithm associated with the signature type.
[0071] In this embodiment, different electronic signatures require different verification content; that is, different signature types can be associated with different verification algorithms. In existing electronic signature technologies, most electronic document standards typically only support a single signature type's algorithm. For example, the standard for Portable Document Format (PDF) only supports RSA algorithm signatures and not other types of signatures such as those using Chinese cryptographic key algorithms. However, with the continuous development of electronic signature technology, different types of electronic signature technologies have also evolved. If the signature algorithm cannot be flexibly changed according to user needs, the flexibility of electronic document signing is greatly reduced, and electronic documents may lack corresponding authorization information in some scenarios, thereby reducing the reliability of electronic documents. In this embodiment, since the electronic document is not bound to the signature type, the electronic device can determine the required signature type of the electronic document based on the user's signature request, and then extract the verification algorithm corresponding to that signature type from the verification database to identify the legality of the electronic document.
[0072] In this embodiment, the items to be verified differ for different signature types. For example, when making an electronic signature for an enterprise, it may be necessary to determine the relevance between the text content in the electronic document and the enterprise. Therefore, the document title of the electronic document, the validity of the signer's certificate corresponding to the electronic document, the compliance and validity of the electronic seal, and whether the signature value of the electronic seal is within the enterprise's valid signature list can be extracted. The verification items corresponding to the electronic signature are interrelated with the signature type. That is, different signature types will correspond to different verification algorithms. The electronic device can extract the verification algorithm corresponding to the signature type from the verification algorithm library.
[0073] In this embodiment, after obtaining the verification algorithm corresponding to the electronic document, the electronic device can import the document information of the electronic document into the verification algorithm and output the verification and recognition result of the electronic document. Optionally, the signature request can specify the signature type corresponding to this electronic signature. The electronic device can query its local database to see if a corresponding verification algorithm is stored based on the signature type. If so, it retrieves the corresponding verification algorithm from the local database for verification; otherwise, it sends the signature type to the corresponding cloud server. For example, for a national cryptographic signature type, it can be sent to a national cryptographic signature server, and for an enterprise signature type, it can be sent to the server of the corresponding enterprise. The corresponding cloud server then retrieves the verification algorithm corresponding to the signature type.
[0074] In this embodiment, if the electronic document is valid, the generated verification result is "verification passed". At this time, the electronic device will execute the operation S103. Conversely, if the electronic document is invalid, the generated verification result is "verification failed". At this time, the electronic device can output the corresponding signature failure prompt message so that the user can obtain the authorization of the electronic signature.
[0075] In S103, if the verification result is successful, signature data associated with the signature type is generated.
[0076] In this embodiment, if the electronic device detects that the verification result of the electronic document is successful, it can identify the electronic document as a legitimate electronic document and can perform electronic signing. Therefore, it will generate signature data corresponding to the signature type. This signature data may include: the electronic certificate of the signer corresponding to the electronic signature, the electronic certificate of the seal maker, the electronic seal, the version number of the electronic seal, the timestamp, the recognition result, etc. By encapsulating the above multiple pieces of information, the signature data corresponding to the electronic document is obtained.
[0077] In S104, the signature data is imported into the signature field of the electronic document to obtain an authorized document with an electronic signature.
[0078] In this embodiment, the electronic document is configured with a signature field, which can be used to store the signature data generated when electronically signing the electronic document. Therefore, after generating signature data corresponding to the signature type, the signature data can be added to the signature field, thereby achieving the purpose of electronically signing the electronic document. The electronic document after being electronically signed is a document that already has relevant authorization characteristics, i.e., an authorized document.
[0079] As can be seen from the above, the electronic document authorization method provided in this application can determine the signature type of the electronic document according to the signature request before signing the electronic document, and obtain the verification algorithm associated with the signature type. The verification algorithm is used to determine whether the electronic document is legal, that is, whether it meets the requirements for adding an electronic signature. If the above verification result is that the verification is successful, it means that the electronic document is a legal document. At this time, the corresponding signature data can be generated and added to the signature field of the electronic document, thereby generating an authorized document with an electronic signature, thus achieving the purpose of adding an electronic signature to the electronic document. Compared with the existing electronic document authorization technology, it does not bind different electronic documents with corresponding signature algorithms. Instead, it can determine the corresponding signature type according to the corresponding signature request and verify the electronic document with the verification algorithm of the signature type. It can flexibly change the verification algorithm used for the electronic document. When the verification is successful, the signature data corresponding to the signature type is imported into the signature field of the electronic document to obtain the corresponding authorized document. This improves the flexibility of the document authorization process and further improves the reliability and authenticity of electronic document signatures.
[0080] Figure 2 A flowchart illustrating a specific implementation of an electronic document authorization method S101 according to a second embodiment of the present invention is shown. See also... Figure 2 In contrast Figure 1 In the embodiment described above, the electronic document authorization method provided in this embodiment includes steps S101, S1011 to S1015, which are detailed below:
[0081] Furthermore, if a signature request for an electronic document to be signed is received, determining the signature type of the electronic document includes:
[0082] In S1011, document keywords of the electronic document are extracted, and a semantic feature vector of the electronic document is generated based on all the document keywords.
[0083] In this embodiment, if the user does not specify the type of signature required for the electronic document, the electronic device can automatically identify the corresponding signature type based on the document information. This identification is achieved by extracting information from the document, specifically from three dimensions: the document's content (i.e., semantic feature vector), the publisher (i.e., user feature vector), and the application (i.e., application feature vector).
[0084] In this embodiment, the electronic device can import the electronic document into the semantic recognition algorithm, extract document keywords related to the document content from all the characters contained in the electronic document, and generate the semantic feature vector of the electronic document based on all the document keywords.
[0085] In one possible implementation, the electronic document can be configured with a corresponding key dictionary. Based on the index of each document's keywords in the key dictionary, the keywords can be vectorized to generate the semantic feature keywords corresponding to the electronic document.
[0086] Furthermore, as another embodiment of this application, the above-described S1011 may specifically include the following steps:
[0087] In S1011.1, semantic analysis is performed on the electronic document to determine the candidate keywords contained in the electronic document.
[0088] In S1011.2, a keyword graph of the electronic document is constructed based on all the candidate keywords, and the word association degree between any candidate keyword and other candidate keywords is calculated based on the keyword graph; the word association degree is specifically as follows:
[0089]
[0090] in, The degree of relevance of the term; This represents the number of associations between the i-th candidate keyword and other candidate keywords in the predefined keyword graph. The number of associations between other candidate keywords and the j-th candidate keyword in the keyword graph.
[0091] In S1011.3, the position feature value of any candidate keyword is determined based on its occurrence position in the electronic document.
[0092] In S1011.4, based on the first occurrence frequency of any candidate keyword in the electronic document and the second occurrence frequency in existing text in a preset corpus, a frequency feature value of any candidate keyword is determined; the frequency feature value is specifically:
[0093]
[0094] in, The frequency feature value; The word frequency feature value is calculated based on the first occurrence frequency and the second occurrence frequency of any candidate keyword.
[0095] In S1011.5, the feature index corresponding to any candidate keyword is calculated based on word relevance, position feature value, and frequency feature value.
[0096] In S1011.6, candidate keywords whose feature index is greater than a preset threshold are selected as document keywords of the electronic document.
[0097] In this embodiment, the electronic device can extract candidate keywords contained in the electronic document through semantic analysis. In order to extract document keywords that can accurately represent the text content of the electronic document from a large number of candidate keywords, the electronic device can make a judgment from three dimensions. The first dimension is the relevance between words (i.e., through word association degree), the second dimension is the occurrence position of the keyword (i.e., position feature value), and the third dimension is the occurrence frequency of the word.
[0098] Regarding the relevance between words, electronic devices can construct a keyword graph of the electronic document. In this graph, multiple candidate keywords that co-occur are identified as having a relationship. Specifically, a co-occurrence relationship is identified when any two or more candidate keywords appear in the same sentence. By counting the number of co-occurrence relationships, the semantic importance of the candidate keywords in the electronic document can be determined, thereby enabling the calculation of the corresponding word relevance.
[0099] For location feature values, electronic documents can be divided into different parts, such as title, subtitle, abstract, body text and conclusion. Different text areas can correspond to different weight values. Electronic devices can calculate the corresponding location feature values based on the weight values corresponding to the parts of the electronic document where candidate keywords appear.
[0100] The frequency feature value corresponding to the frequency of occurrence can be determined based on whether the candidate keyword is a common word. If the candidate keyword appears more often in the electronic document and less often in other documents in the corpus, it means that the candidate keyword is "unique" to the electronic document, and the degree of summarization of the text content is higher.
[0101] In this embodiment, the electronic device can calculate the feature index corresponding to each candidate keyword using the feature values of the above three dimensions, and then select the target keyword based on the feature index.
[0102] In this embodiment of the application, the feature index of candidate keywords is calculated by feature values of different dimensions, which can select keywords that are highly relevant to the text content as document keywords, thereby improving the accuracy of document keyword recognition.
[0103] In S1012, the user information of the user to whom the electronic document belongs is obtained, and a user feature vector corresponding to the user information is generated.
[0104] In this embodiment, each electronic document can be associated with corresponding user information. This user information may include the user information of the user applying for a signature, or the information of the user issuing the electronic seal, etc. The electronic device can generate a corresponding user feature vector based on the user information of all relevant users associated with the electronic document. For example, the user feature vector can be constructed based on feature values of multiple dimensions such as the user identifier and the user's corresponding permission information (and the validity period of the permission information, etc.).
[0105] In S1013, the publication scenario information of the electronic document is determined, and the application feature vector of the electronic document is determined based on the publication scenario information.
[0106] In this embodiment, due to different publishing scenarios, the signature algorithms used may also differ. Electronic devices can determine the corresponding application feature vector by using the publishing scenario information associated with the electronic document.
[0107] In one possible implementation, the publication scenario information of the aforementioned electronic document can be determined based on the document type of the electronic document. If the electronic document is of type doc, it can correspond to the first publication scenario; if the electronic document is of type pdf, it can correspond to the second publication scenario. Different document types can be pre-associated with an application feature vector, so that the corresponding application feature vector can be determined based on the document type in the publication scenario information of the electronic document.
[0108] In S1014, the semantic feature vector, the user feature vector, and the application feature vector are convolved based on a preset convolution kernel to generate the multidimensional feature matrix of the electronic document.
[0109] In this embodiment, the electronic device can import the multi-dimensional vectors mentioned above into the convolution kernel for feature extraction. This can achieve vector dimensionality reduction while filtering out invalid content, thereby obtaining a multi-dimensional feature matrix. The convolution kernel mentioned above can be generated after training with multiple training contents.
[0110] In S1015, based on the matching degree between the multidimensional feature matrix and each candidate type, the candidate type with the highest matching degree is selected as the signature type of the electronic document.
[0111] In this embodiment, different candidate types can be associated with corresponding standard feature matrices. The electronic device can determine the matching degree between the standard feature matrix corresponding to each candidate type and the multidimensional feature matrix of the electronic document by calculating the matrix distance between them, and select the candidate type with the highest matching degree as the signature type of the electronic document.
[0112] In this embodiment, the feature vector of the electronic document is calculated in multiple dimensions, and the multidimensional vector is reduced and features are extracted by using a convolution kernel to obtain a multidimensional feature matrix. This can improve the accuracy of automatic signature type recognition, thereby reducing user setup operations and improving user efficiency.
[0113] Figure 3 A flowchart illustrating a specific implementation of an electronic document authorization method S103 according to a third embodiment of the present invention is shown. See also... Figure 3 In contrast Figure 1 In the embodiment described above, the electronic document authorization method provided in this embodiment includes steps S103, which are further detailed below:
[0114] Further, if the verification and identification result is successful, then generating signature data associated with the signature type includes:
[0115] In S1031, the range of document data to be signed is determined based on the signature request and the document content of the electronic document.
[0116] In this embodiment, since electronic documents can be signed only for a specific range within the document during electronic signing, meaning they do not need to be signed for the entire document, the electronic device can parse the signature request, determine the text range specified by the user, and extract the corresponding document content based on the text range specified by the user, thereby obtaining the document data range that needs to be electronically signed.
[0117] Furthermore, as another embodiment of this application, the above-mentioned S1031 may specifically include the following four steps, which are described in detail below:
[0118] In S1031.1, the signature request is parsed to determine the authorization scope associated with the signature request.
[0119] In S1031.2, semantic recognition is performed on the electronic document to extract word cloud information corresponding to each text paragraph of the electronic document.
[0120] In S1031.3, the matching degree between each word cloud information and the authorized scope is calculated, and the text paragraph corresponding to the word cloud information with a matching degree greater than a preset matching threshold is selected as the target paragraph.
[0121] In S1031.4, the document data range is determined based on the text data contained in the target paragraph.
[0122] In this embodiment, the user does not need to specify the text segments in the electronic document that need to be electronically signed. Instead, they can determine the scope of content to be authorized, for example, by setting the corresponding authorization scope through content keywords or content feature values, and encapsulating the authorization scope within the signature request. The electronic device can perform semantic analysis on the electronic document to determine the word cloud set (i.e., word cloud information) corresponding to each text segment in the electronic document. This word cloud set is determined by the text keywords corresponding to that text segment. The electronic device can match the word cloud information with the authorization scope, thereby selecting the text segments corresponding to the word cloud information with a high degree of matching as the target segments that can be authorized, thus obtaining the scope of document data to be authorized.
[0123] In this embodiment of the application, by extracting word cloud information of each text segment in the electronic text, the text segment to be electronically signed is automatically determined, reducing the user's selection operation and improving the automation level of electronic signature.
[0124] In S1032, a hash value for the document data range is calculated based on the document data included in the document data range and the signature type.
[0125] In S1033, the hash value and the document data are converted using the signature algorithm associated with the signature type to obtain the signature data.
[0126] In this embodiment, after acquiring text data, the electronic device can extract text data within the document data range and import the text data into the hash conversion algorithm corresponding to the signature type to obtain the corresponding signature data. Specifically, the hash conversion algorithm can be generated based on an electronic seal of the signature type, converting the text data using the electronic seal to add the text data within the specified range to the corresponding electronic seal.
[0127] In this embodiment of the application, by automatically determining the range of text data and automatically adding electronic signatures to local data, the number of operations required by the user can be reduced, and the operation of electronic signatures can be made more flexible.
[0128] Figure 4A flowchart illustrating a specific implementation of an electronic document authorization method S102 according to a fourth embodiment of the present invention is shown. See also... Figure 4 In contrast Figure 1-3 In any of the embodiments described above, the electronic document authorization method S102 provided in this embodiment includes: S1021~S1023, which are detailed below:
[0129] Further, the step of identifying the verification result of the electronic document based on the verification algorithm associated with the signature type includes:
[0130] In S1021, the signature information associated with the electronic document is obtained, and the valid authorization scope of the signature information is determined.
[0131] In S1022, the verification identification item is determined according to the verification algorithm.
[0132] In S1023, the authorization feature values corresponding to each of the verification and identification items are extracted from the valid authorization range, and the verification and identification results are generated based on all the authorization feature values.
[0133] In this embodiment, when an electronic document needs to be electronically signed, the signature information corresponding to the electronic document needs to be obtained. This signature information includes the signer's certificate, the seal maker's certificate, and the validity period of the electronic seal. The electronic device can determine the valid authorization scope of the signature information based on the above information, including certificate validity, certificate trust chain verification, certificate validity period verification, and whether the certificate has been revoked. The electronic device can determine the required verification and identification items according to the verification algorithm, extract the corresponding authorization feature values of each verification and identification item from the valid authorization scope, and determine whether the authorization feature values are within the validity period or within the valid authorization scope, thereby obtaining the corresponding verification and identification result.
[0134] In this embodiment of the application, by obtaining the valid authorization scope and extracting the corresponding feature values for verification and identification, the accuracy of verification and identification can be improved, thereby improving the reliability of the subsequently authorized documents.
[0135] Figure 5 A flowchart illustrating a specific implementation of an electronic document authorization method according to a fifth embodiment of the present invention is shown. See also... Figure 5 In contrast Figure 1-3 In any of the embodiments described herein, after importing signature data into the signature field of the electronic document to obtain an authorized document with an added electronic signature, the method further includes steps S501 to S503, which are detailed below:
[0136] Furthermore, after importing the signature data into the signature field of the electronic document to obtain an authorized document with an added electronic signature, the process further includes:
[0137] In S501, if an authorization request for the authorized electronic document is received, the signature type of the authorized document is determined.
[0138] In S502, an authentication algorithm corresponding to the signature type is selected from the authentication database.
[0139] In S503, the signature data is extracted from the authorized document, and the signature data is authenticated and identified using the authentication algorithm to obtain the authentication result.
[0140] In this embodiment, after authorizing the document, the electronic device can also authenticate the electronic document. The authentication process is as follows: 1. Extract the signature data of the signature field from the electronic document. For example, in the process of national cryptographic signature verification, it can be determined from the electronic document that the signature field is GM.PkiLite and / SubFilter is GM.ESeal, so as to determine the corresponding signature type. If it is, it is verified according to the national cryptographic electronic signature verification method; otherwise, it is verified according to the PDF standard. 2. Determine the legality of the signature data: (1) Verify the validity of the signer's certificate; (2) Verify the validity of the signing time (compare the signing time and the validity period of the signer's certificate); (3) Electronic seal verification, verify whether the electronic seal signature value is correct, in the seal signature information, the structure of the signed content (including seal information and the seal maker's public key and algorithm ID), make a digest of the above content, and verify the correctness of the signature value through the seal maker's public key, digest, and signature value. (4) Verify the validity of the electronic seal maker's certificate, certificate trust chain verification, certificate validity period verification, whether the certificate has been revoked, and algorithm OID comparison. 3. Verify the validity period of the electronic seal by comparing the seal's validity period with the seal's creation time and the current time to verify if the electronic seal has expired. 4. Obtain the version number, the data to be signed, the seal's public key, and the ECC signature value of the data to be signed based on the signing data. 5. Generate a digest of the obtained data to be signed. Based on the seven input parameters (i.e., the data to be signed), generate a digest for this portion of the data to be signed and check if the digests are equal. If they are not equal, return the result. 6. Perform ECC verification using the seal's public key, the digest from step 5, and the signature value obtained from step 2 to generate the corresponding authentication result.
[0141] Figure 6 This diagram illustrates a structural block diagram of an electronic document authorization method apparatus according to an embodiment of the present invention. The server includes units for performing various operations. Figure 1 The corresponding implementation steps by the intermediate server are described in the relevant embodiments. Please refer to [link / reference] for details. Figure 1 and Figure 1The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown.
[0142] See Figure 6 The electronic document authorization device includes:
[0143] The signature type determination unit 61 is used to determine the signature type of the electronic document if a signature request for an electronic document to be signed is received.
[0144] The verification and recognition result generation unit 62 is used to identify the verification and recognition result of the electronic document according to the verification algorithm associated with the signature type;
[0145] The signature data generation unit 63 is used to generate signature data associated with the signature type if the verification and recognition result is that the verification is passed.
[0146] The signature data import unit 64 is used to import signature data into the signature field of the electronic document to obtain an authorized document with an electronic signature.
[0147] Optionally, the signature type determination unit 61 includes:
[0148] A semantic feature vector extraction unit is used to extract document keywords from the electronic document and generate a semantic feature vector of the electronic document based on all the document keywords.
[0149] The user feature vector determination unit is used to obtain user information of the user to whom the electronic document belongs, and generate a user feature vector corresponding to the user information.
[0150] An application feature vector determination unit is used to determine the publication scenario information of the electronic document and determine the application feature vector of the electronic document based on the publication scenario information;
[0151] A multidimensional feature matrix generation unit is used to perform convolution operations on the semantic feature vector, the user feature vector, and the application feature vector based on a preset convolution kernel to generate the multidimensional feature matrix of the electronic document.
[0152] A multidimensional feature matrix matching unit is used to select the candidate type with the highest matching degree as the signature type of the electronic document based on the matching degree between the multidimensional feature matrix and each candidate type.
[0153] Optionally, the semantic feature vector extraction unit includes:
[0154] A candidate keyword determination unit is used to perform semantic analysis on the electronic document and determine the candidate keywords contained in the electronic document;
[0155] The word relevance determination unit is used to construct a keyword map of the electronic document based on all the candidate keywords, and to calculate the word relevance between any candidate keyword and other candidate keywords based on the keyword map; the word relevance is specifically:
[0156]
[0157] in, The degree of relevance of the term; This represents the number of associations between the i-th candidate keyword and other candidate keywords in the predefined keyword graph. The number of associations between other candidate keywords and the j-th candidate keyword in the keyword graph;
[0158] A location feature value determination unit is used to determine the location feature value of any candidate keyword based on the occurrence position of any candidate keyword in the electronic document;
[0159] The frequency feature value determination unit is used to determine the frequency feature value of any candidate keyword based on its first occurrence frequency in the electronic document and its second occurrence frequency in existing text in a preset corpus; the frequency feature value specifically includes:
[0160]
[0161] in, The frequency feature value; The word frequency feature value is calculated based on the first occurrence frequency and the second occurrence frequency of any candidate keyword.
[0162] The feature index determination unit is used to calculate the feature index corresponding to any candidate keyword based on word relevance, position feature value, and frequency feature value.
[0163] The feature index comparison unit is used to select candidate keywords whose feature index is greater than a preset threshold as the document keywords of the electronic document.
[0164] Optionally, the signature data generation unit 63 includes:
[0165] The document data range determination unit is used to determine the document data range to be signed based on the signature request and the document content of the electronic document.
[0166] A hash value calculation unit is used to calculate a hash value for the document data range based on the document data included in the document data range and the signature type.
[0167] The data conversion unit is used to convert the hash value and the document data using the signature algorithm associated with the signature type to obtain the signature data.
[0168] Optionally, the document data range determination unit includes:
[0169] An authorization scope determination unit is used to parse the signature request and determine the authorization scope associated with the signature request;
[0170] The word cloud information determination unit is used to perform semantic recognition on the electronic document and extract word cloud information corresponding to each text paragraph of the electronic document.
[0171] The word cloud information matching unit is used to calculate the matching degree between each word cloud information and the authorized scope, and select the text paragraph corresponding to the word cloud information whose matching degree is greater than a preset matching threshold as the target paragraph;
[0172] The text data selection unit is used to determine the document data range based on the text data contained in the target paragraph.
[0173] Optionally, the step of identifying the verification result of the electronic document based on the verification algorithm associated with the signature type includes:
[0174] The effective authorization scope determination unit is used to obtain the signature information associated with the electronic document and determine the effective authorization scope of the signature information;
[0175] A unit is used to determine the verification and identification items according to the verification algorithm;
[0176] The unit is used to extract the authorization feature value corresponding to each of the verification and identification items from the valid authorization range, and generate the verification and identification result based on all the authorization feature values.
[0177] Optionally, after importing the signature data into the signature field of the electronic document to obtain an authorized document with an added electronic signature, the method further includes:
[0178] A unit, configured to determine the signature type of the authorized electronic document if an authorization request is received;
[0179] A unit is used to select the authentication algorithm corresponding to the signature type from the authentication database;
[0180] The unit is used to extract the signature data from the authorized document and perform authentication and recognition on the signature data through the authentication algorithm to obtain the authentication result.
[0181] Therefore, the electronic document authorization method and apparatus provided in this embodiment of the invention can also determine the signature type corresponding to the electronic document based on the signature request before signing the electronic document, and obtain the verification algorithm associated with the signature type. The verification algorithm is used to determine whether the electronic document is legal, i.e., whether it meets the requirements for adding an electronic signature. If the verification result is successful, the electronic document is considered legal. At this point, corresponding signature data can be generated and added to the signature field corresponding to the electronic document, thereby generating an authorized document with an electronic signature, achieving the purpose of adding an electronic signature to the electronic document. Compared with existing electronic document authorization technologies, this method does not bind different electronic documents to corresponding signature algorithms. Instead, it determines the corresponding signature type based on the signature request and verifies the electronic document using the verification algorithm of that signature type. This allows for flexible changes to the verification algorithm used for the electronic document. If the verification is successful, the signature data corresponding to the signature type is imported into the signature field of the electronic document to obtain the corresponding authorized document. This improves the flexibility of the document authorization process and further enhances the reliability and authenticity of electronic document signatures.
[0182] It should be understood that, Figure 6 In the structural block diagram of the electronic document authorization method apparatus shown, each module is used to perform... Figures 1 to 5 The steps in the corresponding embodiments, and for Figures 1 to 5 The steps in the corresponding embodiments have been explained in detail in the above embodiments. Please refer to them for details. Figures 1 to 5 as well as Figures 1 to 5 The relevant descriptions in the corresponding embodiments will not be repeated here.
[0183] Figure 7 This is a structural block diagram of an electronic device provided in another embodiment of this application. For example... Figure 7 As shown, the electronic device 700 of this embodiment includes a processor 710, a memory 720, and a computer program 730 stored in the memory 720 and executable by the processor 710, such as a program for an electronic document authorization method. When the processor 710 executes the computer program 730, it implements the steps of the various embodiments of the electronic document authorization methods described above, for example... Figure 1 S101 to S104 are shown. Alternatively, the processor 710 implements the above when executing the computer program 730. Figure 7 The functions of each module in the corresponding embodiments, for example, Figure 6 For details on the functions of units 61 to 64 shown, please refer to [link / reference needed]. Figure 6 The relevant descriptions in the corresponding embodiments.
[0184] For example, the computer program 730 can be divided into one or more modules, one or more of which are stored in the memory 720 and executed by the processor 710 to complete this application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 730 in the electronic device 700. For example, the computer program 730 can be divided into various unit modules, each with the specific functions described above.
[0185] Electronic device 700 may include, but is not limited to, processor 710 and memory 720. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 700 and does not constitute a limitation on electronic device 700. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.
[0186] The processor 710 may be a central processing unit, or it may be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0187] The memory 720 can be an internal storage unit of the electronic device 700, such as a hard disk or RAM of the electronic device 700. The memory 720 can also be an external storage device of the electronic device 700, such as a plug-in hard disk, smart memory card, flash memory card, etc., equipped on the electronic device 700. Furthermore, the memory 720 can include both internal storage units and external storage devices of the electronic device 700.
[0188] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for authorizing electronic documents, characterized in that, include: If a signature request for an electronic document to be signed is received, the signature type of the electronic document is determined. The verification result of the electronic document is identified based on the verification algorithm associated with the signature type. If the verification result is successful, then signature data associated with the signature type is generated; Import the signature data into the signature field of the electronic document to obtain an authorized document with an added electronic signature; If a signature request for an electronic document to be signed is received, the signature type of the electronic document is determined, including: Extract the document keywords of the electronic document, and generate the semantic feature vector of the electronic document based on all the document keywords; Obtain the user information of the user to whom the electronic document belongs, and generate a user feature vector corresponding to the user information; Determine the publication scenario information of the electronic document, and determine the application feature vector of the electronic document based on the publication scenario information; The semantic feature vector, the user feature vector, and the application feature vector are convolved based on a preset convolution kernel to generate a multidimensional feature matrix of the electronic document. Based on the matching degree between the multidimensional feature matrix and each candidate type, the candidate type with the highest matching degree is selected as the signature type of the electronic document.
2. The authorization method according to claim 1, characterized in that, The step of extracting document keywords from the electronic document and generating a semantic feature vector based on all the document keywords includes: Semantic analysis is performed on the electronic document to determine candidate keywords contained in the electronic document; Based on all the candidate keywords, a keyword graph of the electronic document is constructed, and the word association degree between any candidate keyword and other candidate keywords is calculated based on the keyword graph; the word association degree is specifically: in, The degree of relevance of the term; This represents the number of associations between the i-th candidate keyword and other candidate keywords in the predefined keyword graph. The number of associations between other candidate keywords and the j-th candidate keyword in the keyword graph; Based on the occurrence position of any candidate keyword in the electronic document, determine the position feature value of any candidate keyword; Based on the first occurrence frequency of any candidate keyword in the electronic document and the second occurrence frequency in existing text in a preset corpus, a frequency feature value for each candidate keyword is determined; the frequency feature value is specifically: in, The frequency feature value; The word frequency feature value is calculated based on the first occurrence frequency and the second occurrence frequency of any candidate keyword. Calculate the feature index corresponding to any candidate keyword based on word relevance, position feature value, and frequency feature value; Candidate keywords whose feature index is greater than a preset threshold are selected as document keywords for the electronic document.
3. The authorization method according to claim 1, characterized in that, If the verification result is successful, then signature data associated with the signature type is generated, including: Based on the signature request and the document content of the electronic document, determine the range of document data that needs to be signed; Calculate the hash value of the document data range based on the document data contained within the document data range and the signature type; The signature data is obtained by performing data transformation on the hash value and the document data using the signature algorithm associated with the signature type.
4. The authorization method according to claim 3, characterized in that, The step of determining the range of document data to be signed based on the signature request and the document content of the electronic document includes: The signature request is parsed to determine the scope of authorization associated with the signature request; Perform semantic recognition on the electronic document and extract word cloud information corresponding to each text paragraph of the electronic document; Calculate the matching degree between each word cloud information and the authorized scope, and select the text paragraph corresponding to the word cloud information with a matching degree greater than a preset matching threshold as the target paragraph; The document data range is determined based on the text data contained within the target paragraph.
5. The licensing method according to any one of claims 1-4, characterized in that, The step of identifying the verification result of the electronic document based on the verification algorithm associated with the signature type includes: Obtain the signature information associated with the electronic document and determine the valid authorization scope of the signature information; The verification and identification items are determined according to the verification algorithm; Extract the authorization feature value corresponding to each of the verification and identification items from the valid authorization range, and generate the verification and identification result based on all the authorization feature values.
6. The licensing method according to any one of claims 1-4, characterized in that, After importing the signature data into the signature field of the electronic document to obtain the authorized document with the electronic signature, the process further includes: If an authorization request for the authorized electronic document is received, the signature type of the authorized document is determined; Select the authentication algorithm corresponding to the signature type from the authentication database; The signature data is extracted from the authorized document, and the signature data is authenticated and identified using the authentication algorithm to obtain the authentication result.
7. An electronic document authorization device, characterized in that, include: A signature type determination unit is used to determine the signature type of an electronic document if a signature request for an electronic document to be signed is received. The verification and recognition result generation unit is used to identify the verification and recognition result of the electronic document according to the verification algorithm associated with the signature type; The signature data acquisition unit is used to generate signature data associated with the signature type if the verification and identification result is that the verification is passed. The signature data import unit is used to import signature data into the signature field of the electronic document to obtain an authorized document with an electronic signature. The signature type determination unit includes: A semantic feature vector extraction unit is used to extract document keywords from the electronic document and generate a semantic feature vector of the electronic document based on all the document keywords. The user feature vector determination unit is used to obtain user information of the user to whom the electronic document belongs, and generate a user feature vector corresponding to the user information. An application feature vector determination unit is used to determine the publication scenario information of the electronic document and determine the application feature vector of the electronic document based on the publication scenario information; A multidimensional feature matrix generation unit is used to perform convolution operations on the semantic feature vector, the user feature vector, and the application feature vector based on a preset convolution kernel to generate the multidimensional feature matrix of the electronic document. A multidimensional feature matrix matching unit is used to select the candidate type with the highest matching degree as the signature type of the electronic document based on the matching degree between the multidimensional feature matrix and each candidate type.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Electronic document signature method, device and equipment
CN112214782A
PDF document-based national secret electronic signature method
CN113139210A