Automatic testing method and system for leak tracing software
Through automated testing methods, multiple watermark strategies are automatically generated and issued, combined with server-side evidence collection and comparison, the problem of existing leak traceability software testing relying on manual verification, and efficient and accurate automated testing is achieved.
Patent Information
- Application Number
- CN202210454798.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-04-28
AI Technical Summary
The testing of existing leak traceability software mainly relies on manual interactive verification, resulting in high testing costs and long time. With frequent version iterations, the efficiency of manual verification is difficult to meet the needs.
Through automated testing methods, multiple watermark policies are automatically generated based on the elements in the server watermark strategy, and each policy is sent to the client. The client returns the watermark information and screenshots, and the server performs evidence collection and compares the watermark information and evidence collection report to determine whether the watermark strategy takes effect.
Most automated tests without excessive manual participation are achieved, significantly reducing test time and labor costs, and improving testing efficiency and accuracy.
Smart Images

Figure CN114817039B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software automatic testing, and in particular to an automatic testing method and system for leak tracing software. Background Art
[0002] The leak tracing SDK is a new type of leak tracing forensics technology. By laying a watermark on the screen of the terminal machine, when the terminal machine takes a screenshot or takes a screen shot, causing the content displayed on the screen to be leaked, the hidden watermark information can be extracted from the leaked picture or video to trace the source information such as the leak time and terminal information.
[0003] The leakage tracing SDK is in the form of CS, which includes the server and the client. The server is responsible for configuring the terminal watermark strategy, such as the number of watermark terminals, terminal watermark strength, terminal watermark screen factor, whether the terminal watermark displays a clear watermark, clear watermark template parameters, watermark printing time, watermark embedding parameters, watermark extraction parameters, etc. At the same time, the server is also responsible for extracting the watermark information in the leaked pictures or videos to realize the function of tracing and collecting evidence. The client is a device that needs to protect the screen content, and it mainly displays the watermark on the client's screen according to the watermark strategy issued by the server.
[0004] After the leak tracing SDK is installed on the client and server, it is generally necessary to test it. In addition, both the server and the client need to be tested after the version upgrade. During the test, the server and the client need to be interactively verified. The interactive verification mainly checks whether the watermark policy issued by the server is correctly executed on the client. At present, the interactive verification work is done manually. With the frequent version iterations, the cost of manual verification is getting higher and higher, which greatly increases the time and labor cost of testing. Summary of the invention
[0005] The purpose of the present invention is to provide an automatic testing method for leak tracing software, which can automatically test the leak tracing software.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is: an automatic testing method for leak tracing software, comprising the following steps: automatically generating multiple watermark strategies according to the elements included in the server-side watermark strategy; sending each watermark strategy to the client in turn; the client returns the watermark information and screenshot image corresponding to the watermark strategy to the server; the server collects evidence on the screenshot image to obtain a forensic report, and determines whether the watermark strategy is effective based on whether the watermark information and the forensic report are consistent.
[0007] The purpose of the present invention is to provide an automatic testing system for leak tracing software, which can automatically test the leak tracing software.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is: an automatic testing system for leak tracing software, including a server-side testing module and a client-side testing module, the server-side testing module is installed on the server, and the client-side testing module is installed on the client; after receiving the instruction to start the test, the server-side testing module automatically generates multiple watermark strategies according to the elements included in the server-side watermark strategy and sends each watermark strategy to the client-side testing module in turn; the client-side testing module returns the watermark information and screenshot image corresponding to the watermark strategy to the server-side testing module; the server obtains a forensics report after collecting evidence on the screenshot image, and the server-side testing module compares whether the watermark information and the forensics report are consistent to determine whether the watermark strategy is effective.
[0009] Compared with the prior art, the method and system of the present invention have the following technical effects: first, multiple watermark strategies are automatically generated according to the elements included in the watermark strategy, so that all possible watermark strategies can be automatically generated, and then each strategy is sent to the client, and a screen watermark is generated on the client according to this watermark strategy, and then the screenshot image is uploaded to the server for forensics, and by comparing the watermark information and the forensics report, it can be obtained whether the screenshot image after the watermark is laid can be traced successfully; by traversing all watermark strategies, if they can be traced successfully, it means that the test has passed. This process does not require too much manual participation, and most of it is completed automatically, which greatly reduces the test time and labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a schematic diagram of the process of the present invention;
[0011] Figure 2 It is a principle block diagram of the present invention. DETAILED DESCRIPTION
[0012] Combine the following Figure 1 to Figure 2 , the present invention is further described in detail.
[0013] See also Figure 1The present invention discloses an automatic testing method for leak tracing software, comprising the following steps: automatically generating multiple watermark strategies according to the elements included in the watermark strategy of the server, wherein the automatically generated watermark strategy does not necessarily include the permutation and combination of all elements, but may also be some common watermark configurations, and multiple watermark strategies may be automatically generated according to preset rules, or all watermark strategies set on the deployed server may be read as automatically generated watermark strategies. Each watermark strategy is sent to the client in sequence, and the sequential sending here means: first send a watermark strategy, wait for the client to generate a screen watermark according to the watermark strategy and return the watermark information and screenshot image, and then send the next watermark strategy; even wait until the returned screenshot image is obtained and compared before sending the next watermark strategy. The client returns the watermark information and screenshot image corresponding to the watermark strategy to the server; the server obtains evidence on the screenshot image to obtain an evidence report, and judges whether the watermark strategy is effective according to whether the watermark information and the evidence report are consistent. When the results of whether all watermark strategies are effective are obtained, the test results can be judged. In the present invention, firstly, multiple watermark strategies are automatically generated according to the elements included in the watermark strategy, so that all possible watermark strategies can be automatically generated, and then each strategy is sent to the client, and a screen watermark is generated on the client according to the watermark strategy, and then the screenshot image is uploaded to the server for evidence collection. By comparing the watermark information and the evidence collection report, it can be obtained whether the screenshot image after the watermark is laid can be traced successfully; by traversing all watermark strategies, if they can be traced successfully, it means that the test has passed. This process does not require too much manual participation, and most of it is completed automatically, which greatly reduces the test time and labor cost.
[0014] Furthermore, the watermark information and screenshot corresponding to the watermark strategy are obtained through the following steps: the client captures the watermark strategy to obtain the watermark information; the client adds a watermark to the screen according to the watermark strategy; after the client completes the watermark addition, it takes a screenshot of the screen to obtain the screenshot. The reason for capturing the watermark information is to facilitate the comparison with the forensic report later; capturing the watermark information on the client can ensure that the watermark content added on the screen is consistent with the watermark information.
[0015] Furthermore, our leak tracing and evidence collection product not only supports the evidence collection and tracing of screenshot images, but also supports the evidence collection and tracing of screen capture images. At the same time, in order to verify the test of the screen capture function, the present invention further includes that the client also returns the screen capture image corresponding to the watermark strategy, and the screen capture image is obtained by the following steps: after the client completes the watermark addition, it captures the front image of the screen through a camera or a terminal device including a camera to obtain the screen capture image. This camera can be an independent peripheral connected to the client via a USB wire; it can also be a mobile terminal such as a mobile phone or a tablet.
[0016] Furthermore, the elements of the watermark strategy include one or more of watermark strength, screen factor, whether to display a clear watermark, clear watermark template ID, watermark printing time, watermark embedding parameters, and watermark extraction parameters. The watermark strength here is to define the display strength of the watermark image, and the value range is 0-10. 0 means no invisible watermark. Generally, the value is 3, which is invisible to the naked eye and has a very good invisible effect. When the watermark strength is greater than 3, the watermark is slightly visible to the naked eye. The larger the value, the more obvious the visual effect, which can serve as a warning to users. The screen factor is to continue to adjust the watermark effect based on the watermark strength according to the special display, and the value range is 0-30. When the watermark strength is adjusted, the watermark changes greatly; when the screen factor is adjusted, the watermark changes slightly. By setting these two parameters, the adjustment of the watermark visual effect can be more convenient. When setting the watermark, you can set the watermark to display a QR code, a picture, or text, or not to display the watermark; the watermark template can be set to display a text watermark, or to display information such as the customer IP or the machine name. In order to distinguish different watermarks, we generally assign a template ID to each watermark template, and you can quickly select the displayed watermark content based on the watermark template ID. The watermark update time refers to how often the screen watermark content changes. For example, if the time is set to 2 minutes, it means that the timestamp in the watermark changes every 2 minutes; the watermark embedding parameters can be set to embed the user IP, user name and other information in the watermark; the watermark extraction parameters can be set to extract based on the user IP or user account, etc.
[0017] See also Figure 2The present invention also discloses an automatic testing system for leak tracing software, including a server test module and a client test module, wherein the server test module is installed on the server, and the client test module is installed on the client; after receiving the instruction to start the test, the server test module automatically generates multiple watermark strategies according to the elements included in the server watermark strategy and sends each watermark strategy to the client test module in sequence; the client test module returns the watermark information and screenshots corresponding to the watermark strategy to the server test module; after the server obtains evidence from the screenshots, it obtains an evidence report, and the server test module compares whether the watermark information and the evidence report are consistent to determine whether the watermark strategy is effective. The server test module and the client test module are installed separately, and then the server test module starts to execute the above steps when it receives the start test instruction. The start test instruction here can be set as a button on the server test module, and the tester clicks the button, which is equivalent to receiving the start test instruction; the server version number can also be monitored by the server test module, and the client version number can be monitored by the client test module. When any version number changes, it means that testing is required, which is equivalent to receiving the start test instruction. The test program can be triggered manually by pressing a button, or automatically by monitoring changes in the version number. Testers can choose the appropriate triggering method based on actual needs.
[0018] Furthermore, the server includes a forensics module for collecting evidence from screenshots and generating a forensics report; the server test module includes: a watermark strategy generation unit for generating multiple watermark strategies based on the elements included in the watermark strategy; a first message sending unit for sending the generated watermark strategy; a first message receiving unit for receiving the watermark information and screenshots sent by the client; and a comparison unit for comparing whether the watermark information and the forensics report are consistent to determine whether the watermark strategy is effective. By setting each unit, multiple watermark strategies can be automatically generated and compared and verified, which is very convenient to use.
[0019] Furthermore, the client includes a watermark embedding module for adding a watermark to the screen according to the watermark strategy; the client test module includes: a second message receiving unit for the watermark strategy sent by the first message sending unit; a packet capture unit for capturing the watermark strategy to obtain watermark information; a screenshot unit for taking a screenshot of the screen with the watermark added to obtain a screenshot image; and a second message sending unit for sending the watermark information and the screenshot image to the first message receiving unit. The message sending and receiving units here are mainly used for data transmission between the server and the client. Generally speaking, the client and the server will set up a communication unit for data exchange. The message receiving or sending units here can be directly implemented by the communication unit, or can be set up separately.
[0020] Furthermore, the present invention includes a camera, and the client test module includes a camera control unit, which is used to control the camera to capture the front image of the screen with the watermark added to obtain a screen shot picture; the second message sending unit sends the screen shot picture to the first message receiving unit; and the evidence collection module is also used to collect evidence from the screen shot picture and generate an evidence collection report. After the camera is set, the client test module needs to control it, and can control the camera to capture the front image of the screen to obtain a screen shot picture, and both the screen shot picture and the screenshot picture are transmitted to the server for evidence collection.
[0021] Furthermore, it includes a mobile terminal, on which a mobile terminal test module and a camera are installed. The mobile terminal test module controls the camera to capture the front image of the screen with a watermark added to obtain a screen shot picture and sends the picture to the first message receiving unit; the evidence collection module is also used to collect evidence from the screen shot picture and generate an evidence collection report. The mobile terminal is generally a mobile phone or a tablet, which can be directly connected to the server through the mobile terminal test module, so that the screen picture taken by the mobile terminal can be directly transmitted to the server. Under this scheme, in order to enable the mobile terminal to take pictures automatically, the mobile terminal can also interact with the client for data, and send a control instruction to the mobile terminal test module after the client completes the screenshot, and the mobile terminal test module controls the camera to automatically complete the screen image capture.
Claims
1. An automatic testing method for leak tracing software, characterized by: The steps include: Automatically generate multiple watermark strategies according to the elements included in the watermark strategy of the server, wherein the elements of the watermark strategy include one or more of watermark strength, screen factor, whether to display a clear watermark, a clear watermark template ID, a watermark printing time, a watermark embedding parameter, and a watermark extraction parameter; Sending each watermark strategy to the client in sequence, wherein sending each watermark strategy in sequence means: sending a watermark strategy first, and after the client generates a screen watermark according to the watermark strategy and returns the watermark information and the screenshot, sending the next watermark strategy; The client returns the watermark information and screenshot image corresponding to the watermark strategy to the server. The watermark information and screenshot image corresponding to the watermark strategy are obtained through the following steps: The client captures the watermark policy to obtain watermark information; The client adds watermarks to the screen according to the watermark policy; After the client completes adding the watermark, it takes a screenshot of the screen to obtain a screenshot image; The server collects evidence on the screenshot to obtain a forensic report, and determines whether the watermark strategy is effective based on whether the watermark information is consistent with the forensic report. Specifically, by traversing all the watermark strategies, if all the watermark strategies can be traced successfully, the test passes, otherwise it fails.
2. The automatic testing method for leak tracing software according to claim 1, characterized in that: The client also returns a screen shot corresponding to the watermark strategy, and the screen shot is obtained through the following steps: After the client completes adding the watermark, it captures the front image of the screen through a camera or a terminal device including a camera to obtain a screen capture picture.
3. An automatic testing system for leak tracing software, characterized by: It includes a server test module and a client test module, wherein the server test module is installed on the server and the client test module is installed on the client; After receiving the instruction to start the test, the server test module automatically generates multiple watermark strategies according to the elements included in the server watermark strategy and sends each watermark strategy to the client test module in sequence. Sending each watermark strategy in sequence means: sending a watermark strategy first, and after the client generates a screen watermark according to the watermark strategy and returns the watermark information and the screenshot picture, sending the next watermark strategy; The server includes a forensics module for collecting evidence from screenshots and generating a forensics report; The server test module includes: A watermark strategy generating unit, used to generate a plurality of watermark strategies according to the elements included in the watermark strategy; A first message sending unit, used for sending a generated watermark strategy; A first message receiving unit, used to receive watermark information and screenshot images sent by a client; The client test module returns the watermark information and screenshots corresponding to the watermark strategy to the server test module; The client includes a watermark embedding module for adding a watermark to the screen according to the watermark strategy; The client test module includes: A second message receiving unit, used for the watermark strategy sent by the first message sending unit; A packet capture unit, used to capture packets of the watermark strategy to obtain watermark information; A screenshot unit, used to take a screenshot of the screen with the watermark added to obtain a screenshot image; A second message sending unit, used for sending watermark information and screenshot images to the first message receiving unit; After the server collects evidence on the screenshot, it obtains a forensic report. The server test module compares the watermark information with the forensic report to determine whether the watermark strategy is effective. Specifically, by traversing all the watermark strategies, if all the watermark strategies can be successfully traced, the test passes, otherwise it fails.
4. The automatic testing system for leak tracing software according to claim 3, characterized in that: Including a camera, the client test module includes a camera control unit, the camera control unit is used to control the camera to capture the front image of the screen with a watermark added to obtain a screen capture picture; the second message sending unit sends the screen capture picture to the first message receiving unit; the evidence collection module is also used to collect evidence from the screen capture picture and generate an evidence collection report.
5. The automatic testing system for leak tracing software according to claim 4, characterized in that: It includes a mobile terminal, on which a mobile terminal test module and a camera are installed. The mobile terminal test module controls the camera to capture the front image of the screen with a watermark added to obtain a screen capture picture and send the picture to a first message receiving unit; the evidence collection module is also used to collect evidence from the screen capture picture and generate an evidence collection report.
Citation Information
Patent Citations
Electronic signature anti-counterfeiting device based on invisible watermark and signature making and identifying method thereof
CN112579992A