An alarm sharing method, system, electronic device and computer program product
By using encrypted alarm sharing links and evidence information mapping mechanisms, the problem of information leakage caused by plaintext transmission is solved, and the viewability of alarm information is realized when evidence is not yet complete, thereby improving the security and reliability of alarm sharing for commercial vehicle fleets and risk control and security cloud platforms.
Patent Information
- Application Number
- CN202611240988.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-11-20
AI Technical Summary
In existing alarm sharing solutions, transmitting business parameters in plaintext or semi-plaintext poses a high risk of exposing tenant, user, and permission information. Viewers who are not logged in cannot properly display alarm information, and sharing fails when evidence is not complete.
An encrypted alarm sharing link is used, and the alarm sharing context is generated through server-side processing. This ensures that alarm sharing results can be generated and displayed regardless of whether valid evidence information exists or not. This includes encryption strategies and a mapping mechanism for evidence information.
It improves the security and viewability of alarm sharing, avoids information leakage, and ensures that the viewing end can render the corresponding alarm sharing results regardless of whether the evidence is complete, thus improving the reliability of alarm information display.
Smart Images

Figure CN123144992A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of information security technology, and in particular relates to an alarm sharing method, system, electronic device and computer program product. Background Technology
[0002] In commercial vehicle fleets and cloud platforms for risk control and security, alarm records are often linked to evidence videos, vehicle and driver information, multilingual names of alarm types, geofence snapshots, and tenant-customized extended fields. Businesses need to securely share individual alarms with unlogged-in external viewers, and ensure that key alarm information remains accessible even when related evidence is incomplete.
[0003] In existing solutions, alarm sharing typically uses plaintext or semi-plaintext transmission to carry business parameters, which poses a high risk of exposing tenant, user, and permission information; alarm information cannot be displayed normally when the viewer is not logged in; and the viewer can only get the result of viewing failure when the relevant evidence is not completed, resulting in alarm information sharing failure.
[0004] Therefore, there is an urgent need for a secure alarm information sharing solution that can ensure the viewer can accurately display the alarm information while allowing for rollback or retrying of alarm information for which evidence is incomplete. Summary of the Invention
[0005] In view of this, embodiments of this application provide an alarm sharing method, system, electronic device, and computer program product to improve the security of alarm sharing link transmission, and to allow the viewing end to view the corresponding alarm sharing results regardless of whether valid evidence information exists or not.
[0006] A first aspect of this application provides an alarm sharing method applied to a server, wherein the server is connected to an alarm viewing terminal and an alarm submission terminal; the method includes: In response to a viewing command for an encrypted alarm sharing link, the alarm sharing context corresponding to the alarm sharing link is determined; the alarm sharing link is generated by the alarm submission terminal. Determine the alarm details information corresponding to the alarm sharing context; If valid evidence information corresponding to the alarm sharing context exists, an alarm sharing result is generated based on the alarm details information and the valid evidence information. In the absence of valid evidence information corresponding to the alarm sharing context, an alarm sharing result is generated based on the alarm details information; The alarm sharing result is output to the alarm viewing terminal corresponding to the viewing command, so as to instruct the alarm viewing terminal to display the alarm sharing result.
[0007] In some implementations of the first aspect, before determining the alarm sharing context corresponding to the alarm sharing link in response to a viewing instruction for the encrypted alarm sharing link, the method further includes: In response to an alarm sharing request from the alarm submission terminal, obtain the alarm information from the alarm submission terminal; Read the configuration information of the alarm submission terminal; Based on the alarm information and the configuration information, an alarm sharing context is generated; The alarm sharing context is converted into an encrypted alarm sharing link.
[0008] In some implementations of the first aspect, reading the configuration information of the alarm submission terminal includes: Obtain the sharing policy of the alarm submission terminal; the sharing policy includes sharing within the platform and encrypted sharing via external links; If the sharing strategy is platform internal page sharing, then a platform internal page link is generated based on the alarm information; If the sharing strategy is external link encrypted sharing, then read the configuration information of the alarm submission terminal.
[0009] In some implementations of the first aspect, converting the alarm sharing context into an encrypted alarm sharing link includes: The alarm sharing context is serialized using a fixed-length comma-separated method to obtain the alarm sharing plaintext. The encryption strategy is determined; the encryption strategy includes cryptographic machine encryption and preset algorithm encryption; The alarm sharing plaintext is encrypted according to the encryption strategy to generate alarm sharing ciphertext; The alarm sharing ciphertext is encoded to generate an alarm sharing link.
[0010] In some implementations of the first aspect, determining the alarm sharing context corresponding to the alarm sharing link includes: The encrypted alarm sharing text is determined based on the encrypted alarm sharing link; Determine whether the alarm sharing ciphertext contains cipher machine format markers; If so, the cipher machine is invoked to decrypt the alarm sharing ciphertext to obtain the alarm sharing context; If not, the alarm sharing ciphertext is decrypted using a preset private key to obtain the alarm sharing context.
[0011] In some implementations of the first aspect, the alarm sharing context includes a sharing identifier and an alarm identifier; the method further includes: Determine whether there is an evidence sharing key corresponding to the sharing identifier in the preset mapping information; If the preset mapping information contains an evidence sharing key corresponding to the sharing identifier, then the valid evidence information is read according to the evidence sharing key, and it is determined that there is valid evidence information corresponding to the alarm sharing context. If there is no evidence sharing key corresponding to the sharing identifier in the preset mapping information, then it is determined whether there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset; If there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset, then the valid evidence information is read and it is determined that there is valid evidence information corresponding to the alarm sharing context. If there is no valid evidence information corresponding to the alarm identifier in the preset evidence dataset, then it is determined that there is no valid evidence information corresponding to the alarm sharing context.
[0012] In some implementations of the first aspect, the method further includes: If valid evidence information corresponding to the alarm identifier exists in the preset evidence dataset, an evidence sharing key corresponding to the alarm sharing context is generated based on the valid evidence information and the alarm details information.
[0013] A second aspect of this application provides an alarm sharing device, wherein the server is connected to an alarm viewing terminal and an alarm submission terminal; the device includes: The viewing instruction response module is used to respond to viewing instructions for encrypted alarm sharing links and determine the alarm sharing context corresponding to the alarm sharing link; the alarm sharing link is generated by the alarm submission terminal. The alarm details information determination module is used to determine the alarm details information corresponding to the alarm sharing context; The alarm sharing result first generation module generates an alarm sharing result based on the alarm details information and the valid evidence information, provided that valid evidence information corresponding to the alarm sharing context exists. The second alarm sharing result generation module generates an alarm sharing result based on the alarm details information when there is no valid evidence information corresponding to the alarm sharing context. The alarm sharing result output module outputs the alarm sharing result to the alarm viewing terminal corresponding to the viewing instruction, so as to instruct the alarm viewing terminal to display the alarm sharing result.
[0014] A third aspect of this application provides an alarm sharing system, including a server, and an alarm viewing terminal and an alarm submission terminal connected to the server; The alarm submission terminal is used to: trigger the server to generate an encrypted alarm sharing link; The server includes: The viewing instruction response module is used to respond to viewing instructions for encrypted alarm sharing links and determine the alarm sharing context corresponding to the alarm sharing link. The alarm details information determination module is used to determine the alarm details information corresponding to the alarm sharing context; The alarm sharing result first generation module generates an alarm sharing result based on the alarm details information and the valid evidence information, provided that valid evidence information corresponding to the alarm sharing context exists. The second alarm sharing result generation module generates an alarm sharing result based on the alarm details information when there is no valid evidence information corresponding to the alarm sharing context. The alarm sharing result output module outputs the alarm sharing result to the alarm viewing terminal corresponding to the viewing command. The server is used to display the alarm sharing results.
[0015] A fourth aspect of this application provides an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the alarm sharing method as described in the first aspect above.
[0016] A fifth aspect of this application provides a computer program product, including a computer program that, when run, causes the alarm sharing method as described in the first aspect above to be executed.
[0017] A sixth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the alarm sharing method as described in the first aspect above.
[0018] Compared with the prior art, the embodiments of this application have the following beneficial effects: In this embodiment, in response to a viewing instruction for an encrypted alarm sharing link, an alarm sharing context corresponding to the alarm sharing link is determined. The alarm sharing link is generated by the alarm submission end. This allows the encrypted alarm sharing link to be processed by the server to obtain the alarm sharing context, avoiding leakage of the alarm sharing context and improving its confidentiality. By determining the alarm details information corresponding to the alarm sharing context, if valid evidence information corresponding to the alarm sharing context exists, an alarm sharing result is generated based on the alarm details information and the valid evidence information. If no valid evidence information corresponding to the alarm sharing context exists, an alarm sharing result is generated based on the alarm details information. The alarm sharing result is output to the alarm viewing end corresponding to the viewing instruction, instructing the alarm viewing end to display the alarm sharing result. This ensures that regardless of the existence of valid evidence information, the alarm sharing viewing end can render the corresponding alarm sharing result, avoiding the alarm viewing end having no content to display when there is no valid evidence information, and ensuring the viewability of alarm sharing. Attached Figure Description
[0019] 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.
[0020] Figure 1 This is a schematic diagram of an alarm sharing method provided in an embodiment of this application; Figure 2 This is a schematic diagram of an alarm sharing device provided in an embodiment of this application; Figure 3 This is a schematic diagram of an alarm sharing system provided in an embodiment of this application; Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0021] 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.
[0022] 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.
[0023] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0024] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0025] 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.
[0026] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0027] In alarm sharing scenarios, three-party interaction is typically involved, including: (1) Alarm information service provider: Deploy an alarm processing platform (hereinafter referred to as the platform). The platform can interact with the alarm information submitter and alarm information viewer to complete alarm sharing.
[0028] (2) Alarm information submitter (also known as "sharing initiator"): refers to the user who has completed identity authentication on the platform and initiated the alarm sharing operation. Typical scenarios include: clicking share on the alarm management page, exporting alarm list with sharing link attached, generating alarm link in email / message push, etc.
[0029] (3) Alarm information viewer (also known as “shared accesser”): refers to the person who accesses the shared content through the link sent by the submitter. Generally, it is the link recipient and usually does not need to log in to the platform account.
[0030] The hardware and software of the alarm information service provider are referred to as the server, the hardware and software of the alarm information submitter are referred to as the alarm submission terminal, and the hardware and software of the alarm information viewer are referred to as the alarm viewing terminal. This application embodiment can be implemented by the server, which can have multiple functional services, such as the following: 1. Alarm sharing business service: used for key encryption / decryption, context recovery, cache judgment, rollback, and result assembly. 2. Evidence and alarm basic service (SaaS platform): querying evidence by alarm identifier, generating evidence sharing keys, and returning evidence sharing details and alarm details. 3. Caching service (e.g., Redis): storing the mapping of "sharing identifier → evidence sharing key". 4. Encryption service (RSA or HSM): encrypting and decrypting the alarm sharing context. 5. Sharing auxiliary service: providing additional parameters such as watermarks. The technical solution of this application will be described below through specific embodiments.
[0031] Reference Figure 1 The diagram illustrates an alarm sharing method provided in an embodiment of this application. This alarm sharing method can be applied to a server, which is connected to an alarm viewing terminal and an alarm submission terminal. The method includes: Step 101: In response to the viewing instruction of the encrypted alarm sharing link, determine the alarm sharing context corresponding to the alarm sharing link.
[0032] The alarm sharing link is generated by the alarm submission client. Specifically, the user of the alarm submission client can initiate an alarm sharing request to the server according to their own needs, thereby triggering the server to generate a corresponding encrypted alarm sharing link in response to the alarm sharing request.
[0033] The alarm viewing client can send a viewing command to the server for any encrypted alarm sharing link (for example, a user of the alarm viewing client clicks on an alarm sharing link, which generates a corresponding viewing command, and the server receives and responds to the viewing command).
[0034] Step 102: Determine the alarm details information corresponding to the alarm sharing context; Alarm details can refer to non-evidence content related to alarm sharing. In practical applications, alarm details can be pre-set in combination with specific alarm scenarios. In vehicle alarm scenarios, alarm details may include, but are not limited to, driver's name, license plate, international alarm type name, reverse lookup address, and reconstructed basic alarm information (type, level, classification, time, speed, latitude and longitude, etc.).
[0035] Step 103: If valid evidence information corresponding to the alarm sharing context exists, generate an alarm sharing result based on the alarm details information and the valid evidence information; After determining the alarm sharing context, you can read the alarm-related information contained in the alarm sharing context and determine whether there is valid evidence information corresponding to the alarm sharing context.
[0036] Valid evidence information can refer to existing evidence that is in a ready state. This valid evidence information may include, but is not limited to, video, images, audio, and characters.
[0037] If valid evidence information corresponding to the alarm sharing context is determined to exist, an alarm sharing result is generated based on the valid evidence information.
[0038] Step 104: If no valid evidence information corresponding to the alarm sharing context exists, generate an alarm sharing result based on the alarm details information; If it is determined that there is no valid evidence information corresponding to the alarm sharing context—for example, if there is no corresponding evidence information or the corresponding evidence information is in a pre-ready state—then the alarm details information corresponding to the alarm sharing context is determined, and an alarm sharing result is generated based on the alarm details information. The pre-ready state is used to indicate that the evidence information is unavailable or incomplete.
[0039] Step 105: Output the alarm sharing result to the alarm viewing terminal corresponding to the viewing instruction, so as to instruct the alarm viewing terminal to display the alarm sharing result.
[0040] The alarm sharing result is transmitted to the alarm viewing terminal corresponding to the viewing command, so as to trigger the alarm viewing terminal to visualize the alarm sharing result.
[0041] Specifically, when valid evidence information corresponding to the alarm sharing context exists, the alarm viewing terminal renders the valid evidence information and alarm details in the visualization interface; when no valid evidence information corresponding to the alarm sharing context exists, the alarm viewing terminal renders the alarm details in the visualization interface. This ensures that the alarm sharing viewing terminal can render the corresponding alarm sharing result regardless of whether valid evidence information exists, avoiding the alarm viewing terminal having no content to display when there is no valid evidence information, and ensuring the viewability of alarm sharing.
[0042] In this embodiment, by responding to a viewing instruction for an encrypted alarm sharing link, an alarm sharing context corresponding to the alarm sharing link is determined; the alarm sharing link is generated by the alarm submission end; thus, the encrypted alarm sharing link is processed by the server to obtain the alarm sharing context, avoiding leakage of the alarm sharing context and improving its confidentiality. By determining the alarm details information corresponding to the alarm sharing context; if valid evidence information corresponding to the alarm sharing context exists, an alarm sharing result is generated based on the alarm details information and the valid evidence information; if no valid evidence information corresponding to the alarm sharing context exists, an alarm sharing result is generated based on the alarm details information; the alarm sharing result is output to the alarm viewing end corresponding to the viewing instruction to instruct the alarm viewing end to display the alarm sharing result, thereby ensuring that the alarm sharing viewing end can render the corresponding alarm sharing result regardless of whether valid evidence information exists, avoiding the alarm viewing end having no content to display when there is no valid evidence information, and ensuring the viewability of alarm sharing.
[0043] As an example, before transmitting alarm sharing results to the alarm viewing terminal, the alarm sharing results can be processed as follows: The sharing details returned by the evidence service are converted into a unified data structure adapted to the alarm viewing terminal. The alarm details include pass-through parameters. Personalized extended fields and configuration information in the pass-through parameters are parsed. Then, personalized alarm text is parsed according to alarm type, speed, and personalized extended fields: custom single-line text is output first, otherwise a list of key-value pairs is output. Based on personalized extended fields, alarm type, and alarm time, fence snapshots are queried, and the snapshot fields for device fence, platform fence, and FT device fence (if they exist) are populated respectively. Configuration information (speed / temperature unit, time format, time zone offset, daylight saving time, map type) and control fields such as resource type and whether to display a processing button are written into the alarm sharing results.
[0044] Then, the browser-side sharing page of the alarm viewing terminal receives the alarm sharing results with the above unified data structure by calling the preset interface.
[0045] The alarm viewing client formats time and speed units according to configuration information, filters the list of playable video / image files, and renders map tracks, alarm information panels, and watermarks. When there is no valid evidence information in the alarm sharing results, alarm details such as maps can be displayed to ensure that the international units and time zones displayed in the alarm viewing client are consistent with those when the alarm submission client initiates the sharing. Personalized alarm content and fence snapshots can also be overlaid in the alarm sharing results to enhance the completeness of the display.
[0046] In some implementations of this application, before step 101, the method further includes: in response to an alarm sharing request from an alarm submission terminal, obtaining alarm information from the alarm submission terminal; reading configuration information from the alarm submission terminal; generating an alarm sharing context based on the alarm information and the configuration information; and converting the alarm sharing context into an encrypted alarm sharing link.
[0047] The alarm submission client can send an alarm sharing request to the server. The server responds to the alarm sharing request and reads the alarm information from the alarm submission client, such as the tenant domain name and alarm identifier.
[0048] Then, the configuration information from the alarm submission end is read, including speed unit, temperature unit, date and time format, time zone, map type, etc., for consistency in subsequent display. Then, based on the alarm information and configuration information, an alarm sharing context is generated.
[0049] As an example, in addition to the configuration information and alarm information mentioned above, at least one of the following fields can be written into the alarm sharing context: tenant identifier, application identifier, submitter user identifier and user type, interface language, sharing identifier (generated by snowflake algorithm), expiration timestamp, whether daylight saving time is observed, time zone offset, map type, resource type (normal alarm / volume alarm), and mosaic view marker.
[0050] As an example, an expiration timestamp can be calculated for the alarm sharing context. The expiration timestamp = current time + the longest sharing validity period allowed by the tenant, and this expiration timestamp can be added to the alarm sharing context.
[0051] In another example, an encrypted watermark parameter can be added to the alarm sharing context to link query parameters and overlay watermarks on the page.
[0052] The alarm sharing context obtained from the above processing is converted into an encrypted alarm sharing link.
[0053] In some implementations of this application, reading the configuration information of the alarm submission terminal includes: obtaining the sharing strategy of the alarm submission terminal; the sharing strategy includes sharing on platform internal pages and encrypted sharing on external links; if the sharing strategy is sharing on platform internal pages, then generating a platform internal page link based on the alarm information; if the sharing strategy is encrypted sharing on external links, then reading the configuration information of the alarm submission terminal.
[0054] When reading the configuration information of the alarm submission terminal, the sharing policy of the alarm submission terminal can be read first. If the sharing policy is platform internal page sharing, a platform internal page link is generated based on the alarm information; if the sharing policy is external link encrypted sharing, the configuration information of the alarm submission terminal is read.
[0055] The platform's internal page links can only be viewed by alarm viewing terminals that are logged in with authorized accounts (for example, authorized accounts can directly access the platform's internal page links after logging in, and then view alarm information, and then view the corresponding evidence information through the alarm information), while the aforementioned encrypted alarm sharing links can be viewed by alarm viewing terminals that are not logged in with authorized accounts.
[0056] In some implementations of this application, the step of converting the alarm sharing context into an encrypted alarm sharing link includes: serializing the alarm sharing context using fixed-length comma-separated methods to obtain alarm sharing plaintext; determining an encryption strategy; the encryption strategy includes cryptographic machine encryption and preset algorithm encryption; encrypting the alarm sharing plaintext according to the encryption strategy to generate alarm sharing ciphertext; and encoding the alarm sharing ciphertext to generate an alarm sharing link.
[0057] The alarm sharing context is serialized into a fixed-length comma-separated string (16 segments in total, with empty fields placed in empty strings) to obtain the alarm sharing plaintext.
[0058] As an example, the alarm sharing plaintext is compatible with JSON format. When the alarm plaintext is decrypted and deserialized on the server side, JSON parsing is attempted first. If that fails, comma-separated parsing is then performed.
[0059] In specific implementation, different encryption strategies can be set, including cryptographic machine encryption and preset algorithm encryption; the alarm sharing plaintext is encrypted according to the encryption strategy corresponding to the alarm submission end to obtain the alarm sharing ciphertext.
[0060] Taking the encryption strategy as a cryptographic machine as an example, the cryptographic machine SDK uses a preset business key to encrypt the alarm sharing ciphertext. The alarm sharing ciphertext carries cryptographic machine format markers (e.g., "#"). The private key does not leave the application process and supports centralized key management and rotation.
[0061] Taking the encryption of a preset algorithm (including but not limited to the RSA algorithm) as an example, the alarm sharing plaintext is encrypted according to the preset encryption algorithm to obtain the alarm sharing ciphertext, which does not contain the cryptographic machine format mark "#".
[0062] In specific implementations, other methods can be selected to encrypt the alarm sharing plaintext according to the actual scenario. The encryption method of the alarm sharing plaintext does not affect the implementation of the embodiments of this application. It only requires that the server can correctly decrypt the alarm sharing ciphertext in the corresponding way.
[0063] The alarm sharing encrypted text is URL encoded and then concatenated with query parameters such as tenant domain name, sharing type identifier, language, watermark parameters, application identifier, tenant identifier, and service identifier to form the final alarm sharing link that can be distributed.
[0064] In some implementations of this application, determining the alarm sharing context corresponding to the alarm sharing link includes: determining the alarm sharing ciphertext based on the encrypted alarm sharing link; determining whether the alarm sharing ciphertext contains a cryptographic machine format marker; if the alarm sharing ciphertext contains a cryptographic machine format marker, then calling a cryptographic machine to decrypt the alarm sharing ciphertext to obtain the alarm sharing context; if the alarm sharing ciphertext does not contain a cryptographic machine format marker, then using a preset private key to decrypt the alarm sharing ciphertext to obtain the alarm sharing context.
[0065] In step 101 above, when determining the alarm sharing context for the encrypted alarm sharing link, the alarm sharing ciphertext is obtained by processing the alarm sharing link based on URL encoding. It is then determined whether the ciphertext contains a cryptographic machine format marker (such as the aforementioned "#" (including a secondary determination after Base64 decoding)). If the ciphertext contains a cryptographic machine format marker, the cryptographic machine is called to decrypt the ciphertext to obtain the plaintext; otherwise, the private key corresponding to the preset encryption algorithm is used to decrypt the ciphertext to obtain the plaintext.
[0066] The decrypted plaintext is deserialized into an alarm sharing context, and required fields such as tenant, application, user, alarm identifier, and sharing identifier are verified. If decryption fails, deserialization fails, or required fields are missing, the process is terminated and a confirmation that no valid evidence information exists is returned.
[0067] After obtaining the alarm sharing context, the application, tenant, user, user type, account name, language, and other runtime contexts of the current request thread are restored to the registration submission information encapsulated in the alarm context to ensure consistency with subsequent queries, internationalization calculations, and the initiation of sharing.
[0068] If an expired timestamp exists in the alarm message, the current server timestamp is compared with the expired timestamp in the alarm context. If it has expired, the process is terminated and it is determined that there is no valid evidence information.
[0069] In some implementations of this application, the alarm sharing context includes a sharing identifier and an alarm identifier; the method further includes: Determine whether there is an evidence sharing key corresponding to the sharing identifier in the preset mapping information; If the preset mapping information contains an evidence sharing key corresponding to the sharing identifier, then the valid evidence information is read according to the evidence sharing key, and it is determined that there is valid evidence information corresponding to the alarm sharing context. If there is no evidence sharing key corresponding to the sharing identifier in the preset mapping information, then it is determined whether there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset; If there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset, then the valid evidence information is read and it is determined that there is valid evidence information corresponding to the alarm sharing context. If there is no valid evidence information corresponding to the alarm identifier in the preset evidence dataset, then it is determined that there is no valid evidence information corresponding to the alarm sharing context.
[0070] Read the sharing identifier in the alarm sharing context and query the distributed cache to see if there is already an evidence sharing key corresponding to the sharing identifier.
[0071] If the preset mapping information contains an evidence sharing key corresponding to the sharing identifier, it means that there is already valid evidence information corresponding to the sharing identifier. The valid evidence information is read directly according to the corresponding evidence sharing key, and it is determined that there is valid evidence information corresponding to the alarm sharing context. Then, the above steps 103 and 105 are performed.
[0072] If there is no evidence sharing key corresponding to the sharing identifier in the preset mapping information, then it is determined whether there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset.
[0073] If valid evidence information corresponding to the alarm identifier exists in the preset evidence dataset, then the valid evidence information is read (e.g., extracting the driver's name and license plate number from the evidence record; obtaining the alarm type, subtype, and latitude and longitude from the alarm information embedded in the evidence; parsing the internationalized name of the alarm type according to the current language, and looking up the formatted address by latitude and longitude), and determining that there is valid evidence information corresponding to the alarm sharing context, and then performing the above steps 103 and 105.
[0074] If there is no valid evidence information corresponding to the alarm identifier in the preset evidence dataset, then it is determined that there is no valid evidence information corresponding to the alarm sharing context, and then steps 104 and 105 are executed.
[0075] The above method enables the reuse of valid evidence information by using the mapping information between the sharing identifier and the evidence sharing key.
[0076] It should be noted that if there is an evidence sharing key corresponding to the sharing identifier in the preset mapping information, the corresponding alarm details can be read through the evidence sharing key. If there is no evidence sharing key corresponding to the sharing identifier in the preset mapping information, the alarm details can be queried through the alarm identifier in the alarm sharing context, so as to reuse the determined alarm details through the evidence sharing key.
[0077] By reusing established valid evidence information and alarm details based on the evidence sharing key, the resource overhead of querying valid evidence information and alarm details can be effectively reduced.
[0078] In some implementations of this application, the method further includes: if there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset, generating an evidence sharing key corresponding to the alarm sharing context based on the valid evidence information and the alarm details information.
[0079] If valid evidence information corresponding to the alarm identifier exists in the preset evidence dataset, it means that no evidence sharing key corresponding to the current sharing identifier currently exists. For subsequent valid evidence information and alarm details corresponding to the same sharing identifier, an evidence sharing key corresponding to the alarm sharing context can be generated based on the valid evidence information and the alarm details. The evidence sharing key is written to the cache, and an expiration time is set for the evidence sharing key. The expiration time = sharing expiration timestamp + random jitter (e.g., random jitter is 1~20 seconds). Since the expiration time of the evidence sharing key in the cache includes random jitter, the risk of cache avalanche can be effectively reduced.
[0080] It should be noted that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0081] Reference Figure 2 The diagram illustrates an alarm sharing device provided in an embodiment of this application. The device is located on a server, which is connected to an alarm viewing terminal and an alarm submission terminal. The device includes: The viewing instruction response module 201 is used to respond to a viewing instruction for an encrypted alarm sharing link and determine the alarm sharing context corresponding to the alarm sharing link; the alarm sharing link is generated by the alarm submission terminal. The alarm sharing result first generation module 202 generates an alarm sharing result based on the alarm details information and the valid evidence information when there is valid evidence information corresponding to the alarm sharing context. Alarm details information determination module 203 is used to determine alarm details information corresponding to the alarm sharing context; The second alarm sharing result generation module 204 generates an alarm sharing result based on the alarm details information when there is no valid evidence information corresponding to the alarm sharing context. The alarm sharing result output module 205 outputs the alarm sharing result to the alarm viewing terminal corresponding to the viewing instruction, so as to instruct the alarm viewing terminal to display the alarm sharing result.
[0082] In some implementations of the embodiments of this application, the apparatus further includes: The alarm information acquisition module is used to acquire the alarm information of the alarm submission terminal in response to the alarm sharing request from the alarm submission terminal. The configuration information reading module is used to read the configuration information of the alarm submission terminal; An alarm sharing context generation module is used to generate an alarm sharing context based on the alarm information and the configuration information. An alarm sharing link generation module is used to convert the alarm sharing context into an encrypted alarm sharing link.
[0083] In some implementations of this application, the configuration information reading module is specifically used to obtain the sharing strategy of the alarm submission terminal; the sharing strategy includes platform internal page sharing and external link encrypted sharing; if the sharing strategy is platform internal page sharing, then a platform internal page link is generated based on the alarm information; if the sharing strategy is external link encrypted sharing, then the configuration information of the alarm submission terminal is read.
[0084] In some implementations of this application, the alarm sharing link generation module includes: The alarm sharing plaintext generation submodule is used to serialize the alarm sharing context in a fixed-length comma-separated manner to obtain the alarm sharing plaintext; The encryption strategy determination submodule is used to determine the encryption strategy; the encryption strategy includes cryptographic machine encryption and preset algorithm encryption; The alarm sharing ciphertext generation submodule is used to encrypt the alarm sharing plaintext according to the encryption strategy to generate alarm sharing ciphertext; The alarm sharing link generation submodule is used to encode the alarm sharing encrypted text and generate an alarm sharing link.
[0085] In some implementations of this application, the viewing command response module includes: The alarm sharing ciphertext determination submodule is used to determine the alarm sharing ciphertext based on the encrypted alarm sharing link; The tag determination module is used to determine whether the alarm sharing ciphertext contains a cryptographic machine format tag; if the alarm sharing ciphertext contains a cryptographic machine format tag, the cryptographic machine is called to decrypt the alarm sharing ciphertext to obtain the alarm sharing context; if the alarm sharing ciphertext does not contain a cryptographic machine format tag, the alarm sharing ciphertext is decrypted using a preset private key to obtain the alarm sharing context.
[0086] In some implementations of this application, the alarm sharing context includes a sharing identifier and an alarm identifier; the device further includes: The evidence sharing key determination module is used to determine whether there is an evidence sharing key corresponding to the sharing identifier in the preset mapping information; The evidence sharing key reading module is used to read the valid evidence information according to the evidence sharing key if there is an evidence sharing key corresponding to the sharing identifier in the preset mapping information, and to determine that there is valid evidence information corresponding to the alarm sharing context. The alarm identifier determination module is used to determine whether there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset if there is no evidence sharing key corresponding to the sharing identifier in the preset mapping information. The first evidence dataset processing module is used to read the valid evidence information corresponding to the alarm identifier if there is valid evidence information in the preset evidence dataset; and determine that there is valid evidence information corresponding to the alarm sharing context. The second evidence dataset processing module is used to determine that there is no valid evidence information corresponding to the alarm sharing context if there is no valid evidence information in the preset evidence dataset corresponding to the alarm identifier.
[0087] In some implementations of the embodiments of this application, the apparatus further includes: The evidence sharing key generation module is used to generate an evidence sharing key corresponding to the alarm sharing context based on the valid evidence information and the alarm details information if there is valid evidence information in the preset evidence dataset that corresponds to the alarm identifier.
[0088] This application provides an alarm sharing device, which can be used to implement the steps in the aforementioned method embodiments.
[0089] As the apparatus embodiments are basically similar to the method embodiments, they are described in a relatively simple manner. For relevant details, please refer to the description in the method embodiment section.
[0090] This application provides an alarm sharing device, which can be used to implement the steps in the aforementioned method embodiments.
[0091] As the apparatus embodiments are basically similar to the method embodiments, they are described in a relatively simple manner. For relevant details, please refer to the description in the method embodiment section.
[0092] Reference Figure 4 The diagram illustrates an alarm sharing system provided in an embodiment of this application. The alarm sharing system includes a server, and an alarm viewing terminal and an alarm submission terminal connected to the server. The alarm submission terminal is used to: trigger the server to generate an encrypted alarm sharing link; The server includes: The viewing instruction response module 201 is used to respond to a viewing instruction for an encrypted alarm sharing link and determine the alarm sharing context corresponding to the alarm sharing link. Alarm details information determination module 202 is used to determine alarm details information corresponding to the alarm sharing context; The alarm sharing result first generation module 203 generates an alarm sharing result based on the alarm details information and the valid evidence information when there is valid evidence information corresponding to the alarm sharing context. The second alarm sharing result generation module 204 generates an alarm sharing result based on the alarm details information when there is no valid evidence information corresponding to the alarm sharing context. The alarm sharing result output module 205 outputs the alarm sharing result to the alarm viewing terminal corresponding to the viewing command. The server is used to display the alarm sharing results.
[0093] As the system embodiment is basically similar to the method embodiment, it is described in a relatively simple way. For relevant details, please refer to the descriptions in the method embodiment and device embodiment sections.
[0094] Reference Figure 4 The diagram illustrates an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device 400 in this embodiment includes: a processor 410, a memory 420, and a computer program 421 stored in the memory 420 and executable on the processor 410. When the processor 410 executes the computer program 421, it implements the steps in the various embodiments of the alarm sharing method described above, for example... Figure 1 Steps 101 to 105 are shown. Alternatively, when the processor 410 executes the computer program 421, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3 The functions of modules 201 to 205 are shown.
[0095] For example, the computer program 421 can be divided into one or more modules / units, which are stored in the memory 420 and executed by the processor 410 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which can be used to describe the execution process of the computer program 421 in the electronic device 400. For example, the computer program 421 can be divided into a viewing instruction response module, an alarm sharing result first generation module, an alarm sharing result second generation module, and an alarm sharing result output module, with the specific functions of each module as follows: The viewing instruction response module is used to respond to viewing instructions for encrypted alarm sharing links and determine the alarm sharing context corresponding to the alarm sharing link; the alarm sharing link is generated by the alarm submission terminal. The alarm sharing result first generation module generates an alarm sharing result based on the alarm details information and the valid evidence information, provided that valid evidence information corresponding to the alarm sharing context exists. The second alarm sharing result generation module generates an alarm sharing result based on the alarm details information when there is no valid evidence information corresponding to the alarm sharing context. The alarm sharing result output module outputs the alarm sharing result to the alarm viewing terminal corresponding to the viewing instruction, so as to instruct the alarm viewing terminal to display the alarm sharing result.
[0096] The electronic device 400 can be a server in the foregoing embodiments, such as a desktop computer, cloud server, or other computing device. The electronic device 400 may include, but is not limited to, a processor 410 and a memory 420. Those skilled in the art will understand that... Figure 4 This is merely one example of electronic device 400 and does not constitute a limitation on electronic device 400. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 400 may also include input / output devices, network access devices, buses, etc.
[0097] The processor 410 can be a central processing unit (CPU), or other general-purpose processors, 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, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0098] The memory 420 can be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. The memory 420 can also be an external storage device of the electronic device 400, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, etc., equipped on the electronic device 400. Furthermore, the memory 420 can include both internal and external storage units of the electronic device 400. The memory 420 is used to store the computer program 421 and other programs and data required by the electronic device 400. The memory 420 can also be used to temporarily store data that has been output or will be output.
[0099] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the alarm sharing method as described in the foregoing embodiments.
[0100] This application also discloses a computer program product, including a computer program, which, when run, causes the alarm sharing method as described in the foregoing embodiments to be executed.
[0101] The embodiments described above are only used to illustrate the technical solutions of this application, and are not intended to limit it. 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; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the 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. An alarm sharing method, characterized in that, The method is applied to the server side, which is connected to the alarm viewing terminal and the alarm submission terminal; the method includes: In response to a viewing command for an encrypted alarm sharing link, the alarm sharing context corresponding to the alarm sharing link is determined; the alarm sharing link is generated by the alarm submission terminal. Determine the alarm details information corresponding to the alarm sharing context; If valid evidence information corresponding to the alarm sharing context exists, an alarm sharing result is generated based on the alarm details information and the valid evidence information. In the absence of valid evidence information corresponding to the alarm sharing context, an alarm sharing result is generated based on the alarm details information; The alarm sharing result is output to the alarm viewing terminal corresponding to the viewing command, so as to instruct the alarm viewing terminal to display the alarm sharing result.
2. The method according to claim 1, characterized in that, Before determining the alarm sharing context corresponding to the alarm sharing link in response to a viewing instruction for the encrypted alarm sharing link, the method further includes: In response to an alarm sharing request from the alarm submission terminal, obtain the alarm information from the alarm submission terminal; Read the configuration information of the alarm submission terminal; Based on the alarm information and the configuration information, an alarm sharing context is generated; The alarm sharing context is converted into an encrypted alarm sharing link.
3. The method according to claim 2, characterized in that, The step of reading the configuration information of the alarm submission terminal includes: Obtain the sharing policy of the alarm submission terminal; the sharing policy includes sharing within the platform and encrypted sharing via external links; If the sharing strategy is platform internal page sharing, then a platform internal page link is generated based on the alarm information; If the sharing strategy is external link encrypted sharing, then read the configuration information of the alarm submission terminal.
4. The method according to claim 2, characterized in that, The step of converting the alarm sharing context into an encrypted alarm sharing link includes: The alarm sharing context is serialized using a fixed-length comma-separated method to obtain the alarm sharing plaintext. The encryption strategy is determined; the encryption strategy includes cryptographic machine encryption and preset algorithm encryption; The alarm sharing plaintext is encrypted according to the encryption strategy to generate alarm sharing ciphertext; The alarm sharing ciphertext is encoded to generate an alarm sharing link.
5. The method according to claim 1, characterized in that, Determining the alarm sharing context corresponding to the alarm sharing link includes: The encrypted alarm sharing text is determined based on the encrypted alarm sharing link; Determine whether the alarm sharing ciphertext contains cipher machine format markers; If so, the cipher machine is invoked to decrypt the alarm sharing ciphertext to obtain the alarm sharing context; If not, the alarm sharing ciphertext is decrypted using a preset private key to obtain the alarm sharing context.
6. The method according to claim 1, characterized in that, The alarm sharing context includes a sharing identifier and an alarm identifier; the method further includes: Determine whether there is an evidence sharing key corresponding to the sharing identifier in the preset mapping information; If the preset mapping information contains an evidence sharing key corresponding to the sharing identifier, then the valid evidence information is read according to the evidence sharing key, and it is determined that there is valid evidence information corresponding to the alarm sharing context. If there is no evidence sharing key corresponding to the sharing identifier in the preset mapping information, then it is determined whether there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset; If there is valid evidence information corresponding to the alarm identifier in the preset evidence dataset, then the valid evidence information is read and it is determined that there is valid evidence information corresponding to the alarm sharing context. If there is no valid evidence information corresponding to the alarm identifier in the preset evidence dataset, then it is determined that there is no valid evidence information corresponding to the alarm sharing context.
7. The method according to claim 6, characterized in that, The method further includes: If valid evidence information corresponding to the alarm identifier exists in the preset evidence dataset, an evidence sharing key corresponding to the alarm sharing context is generated based on the valid evidence information and the alarm details information.
8. An alarm sharing system, characterized in that, This includes a server-side application, as well as an alarm viewing terminal and an alarm submission terminal connected to the server-side application. The alarm submission terminal is used to: trigger the server to generate an encrypted alarm sharing link; The server includes: The viewing instruction response module is used to respond to viewing instructions for encrypted alarm sharing links and determine the alarm sharing context corresponding to the alarm sharing link. The alarm details information determination module is used to determine the alarm details information corresponding to the alarm sharing context; The alarm sharing result first generation module generates an alarm sharing result based on the alarm details information and the valid evidence information, provided that valid evidence information corresponding to the alarm sharing context exists. The second alarm sharing result generation module generates an alarm sharing result based on the alarm details information when there is no valid evidence information corresponding to the alarm sharing context. The alarm sharing result output module outputs the alarm sharing result to the alarm viewing terminal corresponding to the viewing command. The server is used to display the alarm sharing results.
9. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, Includes a computer program, which, when run, causes the method as described in any one of claims 1-7 to be performed.
